Changeset 733 for trunk/app/models

Show
Ignore:
Timestamp:
08/21/08 20:27:42 (3 months ago)
Author:
aarkerio
Message:

Little bugs fixed

Files:
1 modified

Legend:

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

    r535 r733  
    1111     
    1212  public $belongsTo  = array( 
    13                              "User" => array( 
    14                                             "className"    => "User", 
    15                                             "foreignKey"   => "user_id" 
     13                             'User' => array( 
     14                                            'className'    => 'User', 
     15                                            'foreignKey'   => 'user_id' 
    1616                                            ) 
    1717             ); 
    1818     
    19      public $validate = array( 
    20            'points' => VALID_NOT_EMPTY, 
    21        'user_id' => VALID_NOT_EMPTY, 
    22            'forum_id' => VALID_NOT_EMPTY, 
    23            'vlcassroom_id' => VALID_NOT_EMPTY 
    24     );  
    25 /* 
    26 public $validate = array( 
    27         'login' => array('alphanumeric' => array( 
    28                                                  'rule' => 'alphaNumeric', 
    29                                              'required' => true, 
    30                                                          'message' => 'Alphabets and numbers only' 
    31                                    ), 
    32                                 'between' => array( 
    33                                            'rule' => array('between', 5, 15), 
    34                                                                                'message' => 'Between 5 to 15 characters' 
    35                                            ) 
    36                                 ), 
    37                        'password' => array( 
    38                                    'rule' => array('minLength', '8'), 
    39                                                                'message' => 'Mimimum 8 characters long' 
    40                                    ), 
    41                        'email' => 'email', 
    42                        'born' => array( 
    43                                'rule' => 'date', 
    44                                'message' => 'Enter a valid date', 
    45                                                            'allowEmpty' => true 
    46                                ) 
    47                        ); */ 
     19 public $validate = array( 
     20  'title' => array( 
     21                    'rule'       => array('minLength', 4), 
     22                    'message'    => 'Title must be at least four characters long', 
     23            'allowEmpty' => false, 
     24                    'required'   => true  
     25            ), 
     26       
     27  'participation' => array( 
     28                    'rule'       => array('minLength', 8), 
     29                    'message'    => 'Text must be at least 8 characters long', 
     30            'allowEmpty' => false, 
     31                    'required'   => true  
     32            ) 
     33   ); 
    4834} 
    4935?>