isUpperCase function
- String? message,
Validates that it's a String and it's uppercase
Implementation
IValidator isUpperCase({String? message}) =>
isString() &
validator(
(value) => value.toUpperCase() == value,
(value) => Expectation(
message: message ?? 'uppercase string',
code: ExpectationCodes.valueCaseMismatch,
data: {'expected_case': 'upper'},
),
);