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