Show
Ignore:
Timestamp:
12/14/2007 04:35:13 PM (11 months ago)
Author:
armen
Message:

You can use php functions like trim, sha1, md5, strtoupper, etc as a rule, jus add an = at the begining of the rule name. Fixed #272
*BC Break* : you can't use trim, sha1 and md5 rules anymore you have to add an = as prefix

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/application/controllers/examples.php

    r1333 r1536  
    142142                        // Format: 
    143143                        // key          friendly name,  validation rules 
    144                         'user' => array('username',    'trim|required[1,12]|regex[[0-9]+]'), 
    145                         'pass' => array('password',    'required|sha1'), 
     144                        'user' => array('username',    '=trim|required[1,12]|regex[[0-9]+]'), 
     145                        'pass' => array('password',    'required|=sha1'), 
    146146                        'reme' => array('remember me', 'required') 
    147147                ));