maxLength static method
Implementation
static String? maxLength(String? value, int length,
{String? message}) {
if (value == null || value.isEmpty) return null;
if (value.length > length) {
return message ?? "Maximum $length characters allowed";
}
return null;
}