Changeset 3225

Show
Ignore:
Timestamp:
07/28/2008 12:57:28 PM (4 months ago)
Author:
Shadowhand
Message:

Follow up to r3224, allow testing by multiple types.

Files:
1 modified

Legend:

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

    r3224 r3225  
    120120                elseif (is_array($type)) 
    121121                { 
    122                         // Use the first type, for use with Validation 
    123                         $type = $type[0]; 
     122                        foreach ($type as $t) 
     123                        { 
     124                                // Test each type for validity 
     125                                if (valid::credit_card($number, $t)) 
     126                                        return TRUE; 
     127                        } 
     128 
     129                        return FALSE; 
    124130                } 
    125131