validateNumber static method
Implementation
static String? validateNumber(String? value) {
if (value == null || value.isEmpty) {
return 'Veuillez remplir le champs';
} else {
String pattern = r'[0-9]{5,16}';
RegExp regex = RegExp(pattern);
if (!regex.hasMatch(value)) {
return 'Entrer Un Nombre Valide';
}
}
return null;
}