BACK TO DIRECTORY

BuddyPress XProfile Validate with RegEx

by Tomasz Ostrowski

4.5
(4 ratings)

With this plugin you can define a PCRE regular expression against which data entered
in XProfile fields will be matched.

For example:

  • check webpage field for a correct(-ish) URL or domain name: %^(https?://)?([^ :/]{1,63}\.)+[^ :/.]{2,63}%iu
  • check age field for a sane(-ish) value (0-199): /^1?[0-9]?[0-9]$/
  • check phone field for a sane(-ish) value: /^+?[0-9 -]{7,45}$/
  • check any field for a minimum and maksimum length: /^.{10,100}$/u

You can also configure a message to show when a field data does not validate.

Plugin Details

Active Installs
10
Total Downloads
2,977
Version
0.1.2
Requires WP
3.8
Requires PHP
Tested Up To
4.2.39
Added
2014-03-21
Last Updated
2015-04-21 8:58am GMT

Ratings

5
3
4
0
3
1
2
0
1
0