Example #1
0
  */
 const EXISTS = 'registryExists';
 protected $_messageTemplates = array(self::EXISTS => "a referência'%value%' já existe.");
 public function isValid($value)
 {
     $table = new Pedidos();
     $row = $table->fetchRow(array('referencia = ?' => $value));
     // Verificação de Tamanho
     if ($row) {
         $this->_error(self::EXISTS, $value);
         return false;