alphaNumeric method

FormFieldValidator<String> alphaNumeric (
  1. {String message}
)

Implementation

static FormFieldValidator<String> alphaNumeric({String message}) {
  return (fieldValue) {
    if (Validator.isAlphaNumeric(fieldValue)) {
      return null;
    } else {
      return message ?? "Field must contain both alphabets and numbers";
    }
  };
}