Show
Ignore:
Timestamp:
12/07/2007 03:04:05 PM (12 months ago)
Author:
Geert
Message:
  • Added uri->rsegment_array(), uri->total_rsegments() and uri->last_rsegment()
  • Synced i18n/nl_NL
  • Some other minor changes
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/helpers/valid.php

    r1446 r1449  
    153153                                'luhn'   => TRUE 
    154154                        ), 
     155                        'maestro' => array 
     156                        ( 
     157                                'length' => '16,18', 
     158                                'prefix' => '50(?:20|38)|6(?:304|759)', 
     159                                'luhn'   => TRUE 
     160                        ), 
     161                        'mastercard' => array 
     162                        ( 
     163                                'length' => '16', 
     164                                'prefix' => '5[1-5]', 
     165                                'luhn'   => TRUE 
     166                        ), 
    155167                        'visa' => array 
    156168                        ( 
     
    159171                                'luhn'   => TRUE 
    160172                        ), 
    161                         'maestro' => array 
    162                         ( 
    163                                 'length' => '16,18', 
    164                                 'prefix' => '50(?:20|38)|6(?:304|759)', 
    165                                 'luhn'   => TRUE 
    166                         ), 
    167                         'mastercard' => array 
     173                        'visa electron' => array 
    168174                        ( 
    169175                                'length' => '16', 
    170                                 'prefix' => '5[1-5]', 
     176                                'prefix' => '4(?:17500|91[37]|508|844)', 
    171177                                'luhn'   => TRUE 
    172178                        ), 
     
    225231        public static function phone($number) 
    226232        { 
    227                 $number = preg_replace('/[^0-9]/', '', $number); 
     233                $number = preg_replace('/\D+/', '', $number); 
    228234 
    229235                if (strlen($number) > 10 AND substr($number, 0, 1) === '1')