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