Changeset 3508 for trunk/system/i18n

Show
Ignore:
Timestamp:
09/29/2008 02:11:36 AM (2 months ago)
Author:
Shadowhand
Message:

Updated Validation:

  • Removed key_string garbage, eg: roles.* will no longer work
  • Removed "any_field" functionality, replaced with wildcard ("star")
  • Renamed safe_array() to as_array(), replacing old as_array() wrapper
  • Updated required() to work with ArrayObject? and be clearer
  • Updated add_error() to not require a field to be set to add an error (doh!)
  • Added proper recursion, by making all sub-arrays instances of Validation
  • Added new method, field_names() to return all fields that have filters, rules, or callbacks applied
  • Added new method apply_filter() to apply a filter to a field
  • Added new method callback() to handle checking and converting filters, rules, and callbacks into fully-qualified callbacks
  • Optimized rule calls to prevent using an argument when no arguments are present (better PHP function compatibility as a side-effect)
  • Optimized validate() to handle sub-array recursion in a much more elegant fashion, use new methods, and handle wildcard rules properly
  • Minor comment and coding standards cleanup
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/i18n/en_US/validation.php

    r3326 r3508  
    33$lang = array 
    44( 
    5         // Class errors 
    6         'invalid_rule'  => 'Invalid validation rule used: %s', 
     5        'not_callable'  => 'Callback %s used for Validation is not callable', 
    76 
    87        // General errors