required method

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

You can override the error message

Implementation

static FormFieldValidator<String> required({String message}) {
  return (fieldValue) {
    if (Validator.isRequired(fieldValue)) {
      return null;
    } else {
      return message ?? "This Field is Required";
    }
  };
}