我正在对电话号码使用zen式认证。 我想,用户应当用这些格式进入电话号码:
"+91-151-1234567", "01234567891", "+912345678901"
也就是说,使用这一定期表述:
"^(?:+?([0-9]{3}))?[-. ]?(?([0-9]{3}))?[-. ]?([0-9]{10})[-. ]$"
but it is not working. it is generating error :
Fatal error: Uncaught exception Zend_Validate_Exception with message Internal error matching pattern ^(?:+?([0-9]{3}))?[-. ]?(?([0-9]{3}))?[-. ]?([0-9]{10})[-. ]$ against value +91-151-3297154 in /var/www/html/allindiazend/library/Zend/Validate/Regex.php:117 Stack trace: #0 /var/www/html/allindiazend/library/Zend/Validate.php(98): Zend_Validate_Regex->isValid( +91-151-3297154 )
1 /var/www/html/allindiazend/library/Zend/Validate.php(98):
Zend_Validate->isValid(+91-151-3297154)
2 /var/www/html/allindiazend/library/Zend/Filter/Input.php(932):
Zend_Validate->isValid(+91-151-3297154)
3 /var/www/html/allindiazend/library/Zend/Filter/Input.php(800):
Zend_Filter_Input->_validate Rule(Array)
4 /var/www/html/allindiazend/library/Zend/Filter/Input.php(688):
Zend_Filter_Input->_validate() #5 /var/www/html/allindiazend/library/Zend/Filter/Input.php(430): Zend_Filter_Input->_process() #6 /var/www/html/allindiazend/application/controllers/StaticController.php(148): Zend_Filter_Input->isValid() #7 /var/www/html/allindi in /var/www/html/allindiazend/library/Zend/Validate/Regex.php on line 117
任何人都能够帮助我这样做。
thank you in advance.