mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
#18627019 : fixed regular expression for checking number pattern
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7194 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
dccc5570cc
commit
d36e4b89a1
1 changed files with 1 additions and 1 deletions
|
|
@ -359,7 +359,7 @@
|
|||
break;
|
||||
case 'number' :
|
||||
case 'numbers' :
|
||||
if(!preg_match('/^(-?)[0-9,]+$/is', $val)) return new Object(-1, sprintf($lang->filter->invalid_number, $lang->{$key} ? $lang->{$key} : $key));
|
||||
if(!preg_match('/^(-?)[0-9]+(,\-?[0-9]+)*$/is', $val)) return new Object(-1, sprintf($lang->filter->invalid_number, $lang->{$key} ? $lang->{$key} : $key));
|
||||
break;
|
||||
case 'alpha' :
|
||||
if(!preg_match('/^[a-z]+$/is', $val)) return new Object(-1, sprintf($lang->filter->invalid_alpha, $lang->{$key} ? $lang->{$key} : $key));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue