toUpperCase function
- IValidator child, {
- String? message,
Transforms a string to uppercase.
Fails if the input value is not a string.
Passes the uppercase string to the child validator.
Implementation
IValidator toUpperCase(IValidator child, {String? message}) {
final base = isString() & core.transform((v) => v.toUpperCase(), child);
return core.handleReturnPreserveValue(base, message);
}