toLowerCase function
- IValidator child
Transforms a string to lowercase.
Fails if the input value is not a string.
Passes the lowercase string to the child
validator.
Implementation
IValidator toLowerCase(IValidator child) {
return isString() & transform((v) => v.toLowerCase(), child);
}