Rev 13579 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?phpApp::uses('AppModel', 'Model');/*** Brand Model**/class Brand extends AppModel {/*** Display field** @var string*/public $displayField = 'name';/*** Validation rules** @var array*/public $validate = array('name' => array('notEmpty' => array('rule' => array('notEmpty'),//'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('Category' => array('className' => 'Category','foreignKey' => 'category_id','conditions' => '','fields' => '','order' => ''));}