src/xPDO/Validation/xPDOValidator.php
public function addMessage($field, $name, $message= null) {
        if (empty($message)) $message= $name;
        array_push($this->messages, array(
            'field' => $field,
            'name' => $name,
            'message' => $message,
        ));
    }
public function addMessage($field, $name, $message= null) {
        if (empty($message)) $message= $name;
        array_push($this->messages, array(
            'field' => $field,
            'name' => $name,
            'message' => $message,
        ));
    }
public function addMessage ( $ field , $ name , $ message = null ) { if ( empty ( $ message ) ) $ message = $ name ; array_push ( $ this -> messages , array ( 'field' => $ field , 'name' => $ name , 'message' => $ message , ) ) ; }
Add a validation message to the stack.

@param string $field The name of the field the message relates to.
@param string $name The name of the rule the message relates to.
@param mixed $message An optional message; the name of the rule is used
if no message is specified.
Add a validation message to the stack .