length static method
Ensures the string length falls within the specified range.
Implementation
static String? Function(String?) length(
int min, {
int? max,
String errorMessage = 'Length is out of range',
}) {
return _build(errorMessage, (v) => v.isLength(min, max));
}