protected function setValidation($values)
    {
        foreach ($values as $validation) {
            $value = isset($validation->value) ? $validation->value : true;

            $this->validation[$validation->rule] = $value;
        }
    }
protected function setValidation($values)
    {
        foreach ($values as $validation) {
            $value = isset($validation->value) ? $validation->value : true;

            $this->validation[$validation->rule] = $value;
        }
    }
protected function setValidation ( $ values ) { foreach ( $ values as $ validation ) { $ value = isset ( $ validation -> value ) ? $ validation -> value : true ; $ this -> validation [ $ validation -> rule ] = $ value ; } }
Set the validation rules

@param   array $values The validation rules

@return  void
Set the validation rules