Title: Patterns in fields
Last modified: March 8, 2019

---

# Patterns in fields

 *  [Jon](https://wordpress.org/support/users/jonmorrow/)
 * (@jonmorrow)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/patterns-in-fields/)
 * How do patterns work in field settings? I’ve searched the documentation (and 
   this forum) and can’t find anything.
 * I’d like to make sure a new user enters a properly formatted U.S. phone number
   in my phone field. I tried patters of (999) 999-9999 like in WPForms and \(\d\
   d\d\) \d\d\d\-\d\d\d\d like in a regex, but neither had the desired effect.
 * Anyone know how to make sure a phone number is entered into a field?
 * Thanks.

Viewing 1 replies (of 1 total)

 *  Plugin Author [Chad Butler](https://wordpress.org/support/users/cbutlerjr/)
 * (@cbutlerjr)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/patterns-in-fields/#post-11293587)
 * “pattern” is an HTML5 input attribute. So there’s nothing magical in WP-Members
   about the use of patterns – it’s just the standard HTML5 (as if you were creating
   an input tag directly).
 * All you need is a valid HTML5 regex for your pattern. There are various regex
   libraries on the web.

Viewing 1 replies (of 1 total)

The topic ‘Patterns in fields’ is closed to new replies.

 * ![](https://ps.w.org/wp-members/assets/icon-256x256.png?rev=1226414)
 * [WP-Members Membership Plugin](https://wordpress.org/plugins/wp-members/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-members/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-members/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-members/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-members/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-members/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Chad Butler](https://wordpress.org/support/users/cbutlerjr/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/patterns-in-fields/#post-11293587)
 * Status: not resolved