| 36 | | public $validate = array( |
| 37 | | 'user_id' => VALID_NOT_EMPTY, |
| 38 | | 'title' => VALID_NOT_EMPTY |
| 39 | | ); |
| 40 | | |
| | 36 | public $validate = array( |
| | 37 | 'title' => array( |
| | 38 | array( |
| | 39 | 'rule' => array('minLength', 4), |
| | 40 | 'required' => true, |
| | 41 | 'allowEmpty' => false, |
| | 42 | 'message' => 'Title can not be empty' |
| | 43 | ) |
| | 44 | ), |
| | 45 | 'instructions' => array( |
| | 46 | array( |
| | 47 | 'rule' => array('minLength', 20), |
| | 48 | 'required' => true, |
| | 49 | 'allowEmpty' => false, |
| | 50 | 'message' => 'Instructions at least 20 characters' |
| | 51 | ) |
| | 52 | ), |
| | 53 | 'secret' => array( |
| | 54 | 'alphanumeric' => array( |
| | 55 | 'rule' > 'alphanumeric', |
| | 56 | 'message' => 'Secret may only consist of letter and numbers', |
| | 57 | 'required' => true, |
| | 58 | 'allowEmpty' => false |
| | 59 | ), |
| | 60 | ) |
| | 61 | ); |