lengthLtEq static method
Checks that the length of checkValue
is less then or equal to ltEq
If checkValue
is not null and checkValue.length
is not less than or
equal to ltEq
than errorMessage
is returned if provided, else the default
is provided. Otherwise null is returned
Implementation
static String? lengthLtEq(String? checkValue, int ltEq,
{String? errorMessage}) {
if (checkValue != null && !(checkValue.length <= ltEq)) {
return errorMessage ?? "Field length not less than or equal too $ltEq";
}
return null;
}