src/Validator.php
private function validate()
    {
        if ($this->hasValidated) {
            return;
        }

        $this->checkDepth();

        foreach ($this->schema as $rule => $parameter) {
            $this->currentKeyword   = $rule;
            $this->currentParameter = $parameter;
            $this->mergeErrors($this->validateRule($rule, $parameter));
            $this->currentKeyword = $this->currentParameter = null;
        }

        $this->hasValidated = true;
    }
private function validate()
    {
        if ($this->hasValidated) {
            return;
        }

        $this->checkDepth();

        foreach ($this->schema as $rule => $parameter) {
            $this->currentKeyword   = $rule;
            $this->currentParameter = $parameter;
            $this->mergeErrors($this->validateRule($rule, $parameter));
            $this->currentKeyword = $this->currentParameter = null;
        }

        $this->hasValidated = true;
    }
private function validate ( ) { if ( $ this -> hasValidated ) { return ; } $ this -> checkDepth ( ) ; foreach ( $ this -> schema as $ rule => $ parameter ) { $ this -> currentKeyword = $ rule ; $ this -> currentParameter = $ parameter ; $ this -> mergeErrors ( $ this -> validateRule ( $ rule , $ parameter ) ) ; $ this -> currentKeyword = $ this -> currentParameter = null ; } $ this -> hasValidated = true ; }
Validate the data and collect the errors.
Validate the data and collect the errors .