somtimes less is more ... do not confuse users with just doing nothing, just because he likes to type phonenumbers with an extra space

This commit is contained in:
Carsten Wolff 2004-07-11 13:35:22 +00:00
parent ec79d81130
commit 23cbfee599

View File

@ -757,7 +757,7 @@
* This format is somewhat loose, allowing for optional parenthesis, + sign,
* and 0-7 numbers between separators.
*/
$regex = "/^[\s]*[\(]?[\+]?\d{0,7}[\s]?[\(]?[0-9]{0,7}[ ]?[\)]?[-]{0,7}[ ]?[0-9]{0,7}[ ]*[-]{0,7}[ ]*[0-9]{0,7}[ ]*$/x";
$regex = "/^[-0-9\+\(\)\/]/";
if(!preg_match($regex,$value))
{
$errors[] = array($field => $value);