| 13 | | public $belongsTo = array('User'); |
| 14 | | /* |
| 15 | | public $validate = array( |
| 16 | | 'login' => array('alphanumeric' => array( |
| 17 | | 'rule' => 'alphaNumeric', |
| 18 | | 'required' => true, |
| 19 | | 'message' => 'Alphabets and numbers only' |
| 20 | | ), |
| 21 | | 'between' => array( |
| 22 | | 'rule' => array('between', 5, 15), |
| 23 | | 'message' => 'Between 5 to 15 characters' |
| 24 | | ) |
| 25 | | ), |
| 26 | | 'password' => array( |
| 27 | | 'rule' => array('minLength', '8'), |
| 28 | | 'message' => 'Mimimum 8 characters long' |
| 29 | | ), |
| 30 | | 'email' => 'email', |
| 31 | | 'born' => array( |
| 32 | | 'rule' => 'date', |
| 33 | | 'message' => 'Enter a valid date', |
| 34 | | 'allowEmpty' => true |
| 35 | | ) |
| 36 | | ); */ |
| | 13 | public $belongsTo = array('User'); |
| | 14 | |
| | 15 | public $validate = array( |
| | 16 | 'title' => array('rule' => array('minLength', 8), |
| | 17 | 'message' => 'Mimimum 8 characters long' |
| | 18 | ), |
| | 19 | 'body' => array('rule' => array('minLength', 40), |
| | 20 | 'message' => 'Mimimum 40 characters long' |
| | 21 | ) |
| | 22 | ); |