email method

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

Implementation

static FormFieldValidator<String> email({String message}) {
  return (fieldValue) {
    if (Validator.isEmail(fieldValue)) {
      return null;
    } else {
      return message ?? "Email is not correct";
    }
  };
}