singleLine static method
FormFieldValidator that requires the field's value to be a single line.
Parameters:
errorText
The error message when the value is not a single line.checkNullOrEmpty
Whether to check for null or empty values.
Implementation
static FormFieldValidator<String> singleLine({
String? errorText,
bool checkNullOrEmpty = true,
}) => SingleLineValidator(
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
).validate;