validate method
Implementation
@override
SchemaValidationError? validate(String value) {
return value.length <= max
? null
: SchemaValidationError.constraints(
'String length is greater than the maximum required length: $max',
);
}