required<T> static method
FormFieldValidator that requires the field have a non-empty value.
Parameters:
errorTextThe error message when the value is empty.checkNullOrEmptyWhether 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;