alphanumericValidator function
Validates whether the input value contains only alphanumeric characters.
Implementation
String? alphanumericValidator(String value) {
if (value.isEmpty || !value.isAlphaNumeric) {
return 'Please enter only letters and numbers.';
}
return null;
}