Phone Number Field Validation

Revision as of 14:25, 3 November 2009 by Ciaran Donnelly (talk | contribs)

Revision as of 14:25, 3 November 2009 by Ciaran Donnelly (talk | contribs)

Validating Phone Number Custom Fields

Custom validation and format for phone number custom fields.

The following functions are available to apply custom validation and format for phone number fields:

  • Javascript Validation - isPhoneStr(@value@,'XXX-XXX-XXXX')
  • HTML Tag - onchange="this.value=convertPhoneStr(this.value,'XXX-XXX-XXXX')"

Phone.png


Multiple validations can be used by using the logical OR operator (i.e. ||) -


isPhoneStr(@value@,'XXX-XXX-XXXX') || isPhoneStr(@value@,'X-XXX-XXX-XXXX')