Changeset 691 for trunk/app/models

Show
Ignore:
Timestamp:
08/04/08 19:55:27 (4 months ago)
Author:
aarkerio
Message:

Update scavanger

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/models/treasure.php

    r687 r691  
    3434                            );    
    3535     
    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                ); 
    4162 public function getTest($user_id, $treasure_id) 
    4263 {