byteLength static method
Ensures the string's UTF-8 byte length falls within a range.
Implementation
static String? Function(String?) byteLength(
int min, {
int? max,
String errorMessage = 'Length is out of range',
}) {
return _build(errorMessage, (v) => v.isByteLength(min, max));
}