call method
Validates whether a value contains only lowercase characters.
This method checks if the input value consists of lowercase letters only
by comparing it with a lowercase version of itself. If the value contains
any uppercase letters or other characters, an error message is generated using
the buildMessage method.
Parameters:
attribute: The identifier of the form attribute being validated.value: The value to be validated.
Returns:
A validation error message if the value contains non-lowercase characters,
or null if the value is valid.
Implementation
@override
String? call(String attribute, String value) {
if (value.isNotEmpty) {
if (value.toLowerCase() != value) {
return buildMessage(attribute, value);
}
}
return null;
}