linccce

my rules

Sep 30th, 2014
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.92 KB | None | 0 0
  1.     public function rules() {
  2.         // NOTE: you should only define rules for those attributes that
  3.         // will receive user inputs.
  4.         return array(
  5.             array('tnum, contract_id, project_id, worker_id, ivedimas, pert_atost, date', 'required'),
  6.             array('contract_id, project_id, worker_id, extra, extra1, user_id, metai', 'numerical', 'integerOnly' => true),
  7.             array('tnum, pert_atost', 'length', 'max' => 255),
  8.             array('menesiai, ivedimas', 'length', 'max'=>2),
  9.             array('pert_atost, ivedimas', 'allowEmpty'=>true),
  10.             array('updatets', 'safe'),
  11.             // The following rule is used by search().
  12.             // @todo Please remove those attributes that should not be searched.
  13.             array('id, tnum, contract_id, project_id, worker_id, ivedimas, pert_atost, extra, extra1, date, user_id, updatets, createts', 'safe', 'on' => 'search'),
  14.         );
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment