max static method
Validates maximum numeric value.
Implementation
static String? max(num? value, num maxValue, {String? fieldName}) {
if (value == null) {
return null;
}
if (value > maxValue) {
return '${fieldName ?? "Value"} must not exceed $maxValue.';
}
return null;
}