Changeset 3520 for trunk/modules/auth
- Timestamp:
- 10/01/2008 02:37:43 PM (2 months ago)
- Location:
- trunk/modules/auth/classes/model/auth
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/auth/classes/model/auth/role.php
r3387 r3520 4 4 5 5 protected $has_and_belongs_to_many = array('users'); 6 7 /** 8 * Validates and optionally saves a role record from an array. 9 * 10 * @param array values to check 11 * @param boolean save the record when validation succeeds 12 * @return boolean 13 */ 14 public function validate(array & $array, $save = FALSE) 15 { 16 $array = Validation::factory($array) 17 ->pre_filter('trim') 18 ->add_rules('name', 'required', 'length[4,32]') 19 ->add_rules('description', 'length[0,255]'); 20 21 return parent::validate($array, $save); 22 } 6 23 7 24 /** -
trunk/modules/auth/classes/model/auth/user.php
r3403 r3520 28 28 * @return boolean 29 29 */ 30 public function validate( array & $array, $save = FALSE)30 public function validate(array & $array, $save = FALSE) 31 31 { 32 32 $array = Validation::factory($array)
