Title: Pattern length
Last modified: June 3, 2022

---

# Pattern length

 *  [esoulsrl](https://wordpress.org/support/users/esoulsrl/)
 * (@esoulsrl)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/pattern-length/)
 * hello, we have a text field and we completed pattern options in this way: {11}
   
   our goal is that the user can compile this filed with a code which is long 11
   characters. it doesn’t work. where are we wrong?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Chad Butler](https://wordpress.org/support/users/cbutlerjr/)
 * (@cbutlerjr)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/pattern-length/#post-15707602)
 * Your pattern only specifies the length. You need to also specify what characters
   are allowed. So you need something like the following:
 * `[A-Za-z0-9]{11}`
 * Note that all this field does is apply the regex as the input pattern attribute,
   which is an HTML5 specification. So anything in this regard that doesn’t work
   isn’t actually anything in the plugin.

Viewing 1 replies (of 1 total)

The topic ‘Pattern length’ 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: [3 years, 11 months ago](https://wordpress.org/support/topic/pattern-length/#post-15707602)
 * Status: not resolved