CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Phone field validation
Pages: [1]

Author Topic: Phone field validation  (Read 1214 times)

pete.h

  • Guest
Phone field validation
January 07, 2010, 10:39:57 am
I've created a custom profile.  For a couple of the fields, I've used the built in phone # fields, specifically, Contacts->Phone->Primary Phone for example.

What I've noticed is that my phone # only validates for it being a required field.  It doesn't validate for a proper phone number entry. I can put in gibberish and it will save that field.

Do I need to implement my own validation beyond the required field validation, or is there something I'm missing here?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Phone field validation
January 07, 2010, 10:46:07 am

yes, u'll need to implement your own phone number validation, since phone formats vary across different countries etc (and then extension formats complicate matters)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

pete.h

  • Guest
Re: Phone field validation
January 07, 2010, 10:48:27 am
Thank you for the quick reply.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Phone field validation

This forum was archived on 2017-11-26.