| 23 | | 'item' => VALID_NOT_EMPTY, //'/[a-z0-9\_\-]{3,}$/i', |
| 24 | | 'user_id' => VALID_NOT_EMPTY, |
| 25 | | 'catglossary_id' => VALID_NOT_EMPTY, |
| 26 | | 'definition' => VALID_NOT_EMPTY |
| | 23 | 'item' => array('rule' => array('minLength', 3), |
| | 24 | 'required' => true, |
| | 25 | 'message' => 'Item at least three characters', |
| | 26 | 'allowEmpty' => false |
| | 27 | ), |
| | 28 | 'definition' => array('rule' => array('minLength', 10), |
| | 29 | 'required' => true, |
| | 30 | 'message' => 'Definition least ten characters', |
| | 31 | 'allowEmpty' => false |
| | 32 | ), |
| | 33 | 'catglossary_id' => array('rule' => array('minLength', 1), |
| | 34 | 'required' => true, |
| | 35 | 'message' => 'Catglossary can not be empty', |
| | 36 | 'allowEmpty' => false |
| | 37 | ) |
| 28 | | /* |
| 29 | | public $validate = array( |
| 30 | | 'login' => array('alphanumeric' => array( |
| 31 | | 'rule' => 'alphaNumeric', |
| 32 | | 'required' => true, |
| 33 | | 'message' => 'Alphabets and numbers only' |
| 34 | | ), |
| 35 | | 'between' => array( |
| 36 | | 'rule' => array('between', 5, 15), |
| 37 | | 'message' => 'Between 5 to 15 characters' |
| 38 | | ) |
| 39 | | ), |
| 40 | | 'password' => array( |
| 41 | | 'rule' => array('minLength', '8'), |
| 42 | | 'message' => 'Mimimum 8 characters long' |
| 43 | | ), |
| 44 | | 'email' => 'email', |
| 45 | | 'born' => array( |
| 46 | | 'rule' => 'date', |
| 47 | | 'message' => 'Enter a valid date', |
| 48 | | 'allowEmpty' => true |
| 49 | | ) |
| 50 | | ); */ |