Ver Mensaje Individual
  #2 (permalink)  
Antiguo 05/09/2012, 16:44
Avatar de Ronruby
Ronruby
 
Fecha de Ingreso: julio-2008
Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 15 años, 9 meses
Puntos: 416
Respuesta: $this->Model->validates cakephp

Cambia tu modelo por:
Código PHP:
Ver original
  1. public $validate = array(
  2.         'nombre' => array(
  3.             'notEmpty' => array(
  4.                 'rule' => 'notEmpty',
  5.                 'message' => 'Your custom message here',
  6.                 //'allowEmpty' => false,
  7.                 //'required' => false,
  8.                 //'last' => false, // Stop validation after this rule
  9.                 //'on' => 'create', // Limit validation to 'create' or 'update' operations
  10.             ),
  11.         ),
  12.         'pais' => array(
  13.             'notEmpty' => array(
  14.                 'rule' => 'notEmpty',
  15.                 //'message' => 'Your custom message here',
  16.                 //'allowEmpty' => false,
  17.                 //'required' => false,
  18.                 //'last' => false, // Stop validation after this rule
  19.                 //'on' => 'create', // Limit validation to 'create' or 'update' operations
  20.             ),
  21.         ),
  22.     );
Trata asi y dime que tal.