Changeset 1546

Show
Ignore:
Timestamp:
12/16/2007 05:23:11 AM (10 months ago)
Author:
armen
Message:

It is possible to use , in validator parameter now, just use a leading slash before it. (\,)
It is usefull when you want use , in your regex or so

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/Validation.php

    r1545 r1546  
    361361                        { 
    362362                                $rule   = $match[1]; 
    363                                 $params = explode(',', $match[2]); 
     363                                $params = preg_split('/(?<!\\\\)(\,)/', $match[2]); 
     364                                $params = str_replace('\,', ',', $params); 
    364365                        } 
    365366