TextValidationConfig.required constructor
TextValidationConfig.required({})
Preset for required text input.
Implementation
factory TextValidationConfig.required({
int? minLength,
int? maxLength,
String? pattern,
String? allowedCharacters,
Set<String> blacklistedWords = const {},
bool trimWhitespace = true,
}) {
return TextValidationConfig(
allowEmpty: false,
allowOnlyWhitespace: false,
trimWhitespace: trimWhitespace,
minLength: minLength,
maxLength: maxLength,
pattern: pattern,
allowedCharacters: allowedCharacters,
blacklistedWords: blacklistedWords,
);
}