equals static method

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

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