notEquals static method

String? notEquals(
  1. String? checkValue,
  2. String compareValue, {
  3. String? errorMessage,
})

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;
}