Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6041317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:38:39+00:00 2026-05-23T06:38:39+00:00

I am using zend form validation for a phone number. and I want, user

  • 0

I am using zend form validation for a phone number. and I want, user should enter phone number in these formats:

"+91-151-1234567", "01234567891",
"+912345678901"

so i am using this regular expression:

"^(?:\+?([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->_validateRule(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

Can any one help me for making this.

thank you in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T06:38:40+00:00Added an answer on May 23, 2026 at 6:38 am

    This expression will match all your 3 examples:

    \+?([0-9]{2})-?([0-9]{3})-?([0-9]{6,7})
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

About to create a form using Zend Form, all the form elements should have
I am using FirePHP with Zend Framework. When the user submits a form, I
Server side extjs form validation using zend framework I have extended Zend_Form class to
I am using jquery validation plugin and zend framework. I have my form in
Im using Zend form. What should I do to get correct action parameter in
I am having problems getting validation to work for a form built using Zend_Form.
I am new to zend. I am trying to create login form using zend
I am building a form in Zend Framework 1.9 using subforms as well as
I am using Zend Framework(MVC part of it), and need to either redirect user
I'm using Zend forms. I have a form to add a row to a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.