public function setValidationError($attributeName, $validationName, $errorMessage)
    {
        $this->validationErrors = Hash::merge($this->getValidationErrors(), array(
            $attributeName => array(
                $validationName => $errorMessage
            )
        ));
    }
public function setValidationError($attributeName, $validationName, $errorMessage)
    {
        $this->validationErrors = Hash::merge($this->getValidationErrors(), array(
            $attributeName => array(
                $validationName => $errorMessage
            )
        ));
    }
public function setValidationError ( $ attributeName , $ validationName , $ errorMessage ) { $ this -> validationErrors = Hash :: merge ( $ this -> getValidationErrors ( ) , array ( $ attributeName => array ( $ validationName => $ errorMessage ) ) ) ; }
Allows the declaration of a validation error on the current entity.
@param string $attributeName      The name of a model attribute
@param string $validationName A type of validation (ex: 'required')
@param string $errorMessage   The error message
Allows the declaration of a validation error on the current entity .