isTrue static method
FormFieldValidator that requires the field's value to be a bool and true.
Parameters:
errorText
The error message when the value is not true.checkNullOrEmpty
Whether to check for null or empty values.
Implementation
static FormFieldValidator<bool> isTrue({
String? errorText,
bool checkNullOrEmpty = true,
}) => IsTrueValidator(
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
).validate;