notBlank function
Implementation
bool notBlank(dynamic property, ConstraintValidatorContext cvc) {
if (property == null) {
return false;
}
if (property is! String) {
throw StateError('NotBlank validation can only by tested on a String');
}
return property.replaceAll(' ', '').isNotEmpty;
}