protected function validateAll($includeAllRules = false)
    {
        if ($includeAllRules) {
            /*
             * Include fields that might not have been included
             */
            $fieldData = new Collection(array_fill_keys(array_keys($this->_validations->toArray()), null));
            $fieldData->update($this->_updates->toArray());
        }
        else
        {
            $fieldData = clone $this->_updates;
        }

        foreach ($fieldData->toArray() as $field => $val) {
            //Match double fields
            $field2 = $field . '2';
            if (!is_null($fieldData->$field2)) {
                // Compared the two double fields
                if ($val != $fieldData->$field2) {
                    $this->log->formError($field, ucfirst($field) . 's did not match');
                } else {
                    $this->log->report(ucfirst($field) . 's matched');
                }
            }

            // Trim white spaces at end and start
            if ($this->_updates->$field) {
                $this->_updates->$field = trim($val);
            }

            // Check if a validation rule exists for the field
            if ($validation = $this->_validations->$field) {
                $this->validate($field, $validation->limit, $validation->regEx);
            }
        }
        return !$this->log->hasError();
    }
protected function validateAll($includeAllRules = false)
    {
        if ($includeAllRules) {
            /*
             * Include fields that might not have been included
             */
            $fieldData = new Collection(array_fill_keys(array_keys($this->_validations->toArray()), null));
            $fieldData->update($this->_updates->toArray());
        }
        else
        {
            $fieldData = clone $this->_updates;
        }

        foreach ($fieldData->toArray() as $field => $val) {
            //Match double fields
            $field2 = $field . '2';
            if (!is_null($fieldData->$field2)) {
                // Compared the two double fields
                if ($val != $fieldData->$field2) {
                    $this->log->formError($field, ucfirst($field) . 's did not match');
                } else {
                    $this->log->report(ucfirst($field) . 's matched');
                }
            }

            // Trim white spaces at end and start
            if ($this->_updates->$field) {
                $this->_updates->$field = trim($val);
            }

            // Check if a validation rule exists for the field
            if ($validation = $this->_validations->$field) {
                $this->validate($field, $validation->limit, $validation->regEx);
            }
        }
        return !$this->log->hasError();
    }
protected function validateAll ( $ includeAllRules = false ) { if ( $ includeAllRules ) { /*
             * Include fields that might not have been included
             */ $ fieldData = new Collection ( array_fill_keys ( array_keys ( $ this -> _validations -> toArray ( ) ) , null ) ) ; $ fieldData -> update ( $ this -> _updates -> toArray ( ) ) ; } else { $ fieldData = clone $ this -> _updates ; } foreach ( $ fieldData -> toArray ( ) as $ field => $ val ) { //Match double fields $ field2 = $ field . '2' ; if ( ! is_null ( $ fieldData -> $ field2 ) ) { // Compared the two double fields if ( $ val != $ fieldData -> $ field2 ) { $ this -> log -> formError ( $ field , ucfirst ( $ field ) . 's did not match' ) ; } else { $ this -> log -> report ( ucfirst ( $ field ) . 's matched' ) ; } } // Trim white spaces at end and start if ( $ this -> _updates -> $ field ) { $ this -> _updates -> $ field = trim ( $ val ) ; } // Check if a validation rule exists for the field if ( $ validation = $ this -> _validations -> $ field ) { $ this -> validate ( $ field , $ validation -> limit , $ validation -> regEx ) ; } } return ! $ this -> log -> hasError ( ) ; }
Validates All fields in _updates queue

@param bool $includeAllRules - Will also run rules not validated

@return bool
Validates All fields in _updates queue