equals static method
Checks that checkValue
equals compareValue
.
Attempts to compare checkValue
and compareValue
. If they are not
equal than errorMessage
is returned if provided, or the default error if not.
Otherwise null
is returned
Implementation
static String? equals(String? checkValue, String compareValue,
{String? errorMessage}) {
if (checkValue != compareValue) {
return errorMessage ?? "Field does not equal '$compareValue'";
}
return null;
}