Title: Input restrictions: pattern
Last modified: June 26, 2018

---

# Input restrictions: pattern

 *  [Zambu](https://wordpress.org/support/users/thomasw98/)
 * (@thomasw98)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/input-restrictions-pattern/)
 * I would like to know more about the Input Restriction for text based on “pattern”.
   I followed the link to the w3 javascript page but have no idea how to use this
   in your plugin or what is allowed.
 * A couple simple examples of what I could add in the pattern section and how this
   would effect the text input would be great. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Pablo Pacheco](https://wordpress.org/support/users/karzin/)
 * (@karzin)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/input-restrictions-pattern/#post-10436393)
 * Hello,
 * Actually I think I will replace this link by this one:
    [https://www.w3schools.com/tags/att_input_pattern.asp](https://www.w3schools.com/tags/att_input_pattern.asp)
 * It explains better how to use the pattern attribute.
    If you have a more specific
   question, please let me know.
 *  Thread Starter [Zambu](https://wordpress.org/support/users/thomasw98/)
 * (@thomasw98)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/input-restrictions-pattern/#post-10437816)
 * **“A couple simple examples of what I could add in the pattern section and how
   this would effect the text input would be great.”**
 * Looking at your link, I see, for example, something that says ‘pattern=”[A-Za-
   z]{3}”‘ Hmmmm, I guess I understand that, but I wonder how to actually format
   this in this plugin’s “pattern” input section. Should I type pattern=”[A-Za-z]{
   3}” with quotes, or maybe “[A-Za-z]{3}”, or perhaps just [A-Za-z]{3} without 
   the quotes??? I guess I will just have to hack around with it to figure it out.
 * Gee, if only someone had given me a simple example…that would have really helped…
 *  [Pablo Pacheco](https://wordpress.org/support/users/karzin/)
 * (@karzin)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/input-restrictions-pattern/#post-10437849)
 * I’m sorry,
    You just have to add it without quotes, like **[A-Za-z]{3}**

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Input restrictions: pattern’ is closed to new replies.

 * ![](https://ps.w.org/product-input-fields-for-woocommerce/assets/icon-256x256.
   png?rev=2717446)
 * [Product Input Fields for WooCommerce](https://wordpress.org/plugins/product-input-fields-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/product-input-fields-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/product-input-fields-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/product-input-fields-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/product-input-fields-for-woocommerce/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Pablo Pacheco](https://wordpress.org/support/users/karzin/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/input-restrictions-pattern/#post-10437849)
 * Status: not resolved