form_field_validator 1.1.0 form_field_validator: ^1.1.0 copied to clipboard
A straightforward flutter form field validator that provides common validation options.
// assign it directly to a TextFormField validator
TextFormField(
validator: EmailValidator(errorText: 'enter a valid email address')
);
// create a reusable instance
final requiredValidator = RequiredValidator(errorText: 'this field is required');
// again assign it directly to the validator
TextFormField(validator: requiredValidator);