required<T> static method
FormFieldValidator that requires the field have a non-empty value.
Parameters:
errorText
The error message when the value is empty.checkNullOrEmpty
Whether to check for null or empty values.
Implementation
static FormFieldValidator<T> required<T>({
String? errorText,
bool checkNullOrEmpty = true,
}) => RequiredValidator<T>(
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
).validate;