array( 'numeric' => array( 'rule' => array('numeric'), //'message' => 'Your custom message here', //'allowEmpty' => false, //'required' => false, //'last' => false, // Stop validation after this rule //'on' => 'create', // Limit validation to 'create' or 'update' operations ), ), 'opening_id' => array( 'numeric' => array( 'rule' => array('numeric'), //'message' => 'Your custom message here', //'allowEmpty' => false, //'required' => false, //'last' => false, // Stop validation after this rule //'on' => 'create', // Limit validation to 'create' or 'update' operations ), ), ); public $belongsTo = array( 'DreamjobWorker' => array( 'className' => 'DreamjobWorker', 'foreignKey' => 'worker_id' ), 'DreamjobJobOpening' => array( 'className' => 'DreamjobJobOpening', 'foreignKey' => 'opening_id' ) ); }