I want to validate a text field for a Identity Card number. ID no has 9 digits and one character. Here is my code. how to do this validation? "code"
Widget buildIDno(){
return TextFormField(
decoration: InputDecoration(labelText: 'National Identy Card Number'),
validator: (String value){
if(value.isEmpty){
return 'ID no is Required';
}
}
);