the field must be equal to
@access public
@param $equal string
@param $error string
@return \Gcs\Framework\Core\Orm\Validation\Element\Element
@since 3.0
@package Gcs\Framework\Core\Form\Validation\Element
542916
public function equal($equal, $error) {
        if ($this->_exist) {
            array_push($this->_constraints, ['type' => self::EQUAL, 'value' => $equal, 'message' => $error]);
        }

        return $this;
    }
461467
public function addError(string $error, array $options = []) {
        $this->validation->addError($this->getName(), $error, $options);
        return $this;
    }
1140104
public function validate($value) {
        return (string)$value == (string)$this->filter($value) ? $value : Filter::ERR_INVALID;
    }
640859
public function equals($value) {
        if ($value instanceof PHPString) {
            $value = $value->getValue();
        }
        return strcmp($this->value, $value) === 0;
    }
830443
public function alpha($error) {
        if ($this->_exist) {
            array_push($this->_constraints, ['type' => self::ALPHA, 'message' => $error]);
        }

        return $this;
    }
157926
protected function visitSirelNodeEqual(Node\Equal $equal)
    {
        $left  = $this->visit($equal->getLeft());
        $right = $equal->getRight();

        if ($right === null) {
            return $left . ' IS NULL';
        } else {
            return $left . ' = ' . $this->visit($right);
        }
    }
1233263
public static function validateStrEqI($value, $equalsValue, $reason = null, $alias = 'Parameter')
    {
        if (is_string($value)) {
            if (strcasecmp($value, $equalsValue) === 0)
                return $value;
            $isTypeError = false;
        } else
            $isTypeError = true;

        if ($reason !== null)
            throw new ValidationException($reason);

        if ($isTypeError) {
            $error = self::getErrorTemplate('Str');
            $error = str_replace('{{param}}', $alias, $error);
        } else {
            $error = self::getErrorTemplate('StrEqI');
            $error = str_replace('{{param}}', $alias, $error);
            $error = str_replace('{{value}}', $equalsValue, $error);
        }
        throw new ValidationException($error);
    }
520853
public function validation($error)
    {
        $url = $this->controller->request->getRequestTarget();
        $status = $code = $error->getCode();
        try {
            $this->controller->response = $this->controller->response->withStatus($status);
        } catch (Exception $e) {
            $status = 422;
            $this->controller->response = $this->controller->response->withStatus($status);
        }

        $sets = [
            'code' => $code,
            'url' => h($url),
            'message' => $error->getMessage(),
            'error' => $error,
            'errorCount' => $error->getValidationErrorCount(),
            'errors' => $error->getValidationErrors(),
            '_serialize' => ['code', 'url', 'message', 'errorCount', 'errors']
        ];
        $this->controller->set($sets);

        return $this->_outputMessage('error400');
    }
501305
public function addError($error)
    {
        if (is_array($error)) {
            $this->errors += $error;
        } else {
            $this->errors[] = $error;
        }

        return $this;
    }
1178952
private function pluckError(array $error) {
        $row = array_intersect_key(
            $error,
            ['field' => 1, 'error' => 1, 'code' => 1]
        );

        $row['message'] = $this->formatErrorMessage($error);
        return $row;
    }
349051
final public function equals($value)
    {
        if ($value instanceof Enum) {
            return $this->value == $value->getValue();
        }
        return $this->value == $value;
    }
1001101
public function alphaNum($error) {
        if ($this->_exist) {
            array_push($this->_constraints, ['type' => self::ALPHANUM, 'message' => $error]);
        }

        return $this;
    }
206692
function renderElement(&$element, $required, $error)
    {
        $elAry = $this->_elementToArray($element, $required, $error);
        if (!empty($error)) {
            $this->_ary['errors'][$elAry['name']] = $error;
        }
        $this->_storeArray($elAry);
    }
453187
public static Object validateEqual(Object t1, Object t2, String errorMsg) throws ValidateException {
		if (false == equal(t1, t2)) {
			throw new ValidateException(errorMsg);
		}
		return t1;
	}
240190
public function withError(string $error): PayloadInterface
    {
        if ($this->error === $error) {
            return $this;
        }

        $clone = clone $this;
        $clone->error = $error;

        return $clone;
    }
1361072
function equal($other)
    {
        return ((gettype($this) == gettype($other))
                && ($this->handle == $other->handle)
                && ($this->secret == $other->secret)
                && ($this->issued == $other->issued)
                && ($this->lifetime == $other->lifetime)
                && ($this->assoc_type == $other->assoc_type));
    }
1249952
public function equalTo($expected): Expect {
            $this->testsTheEqualityAgainstAValue = true;
            $this->expected = $expected;

            return $this;
        }