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