Title: Minimum Length and Maximum
Last modified: May 3, 2017

---

# Minimum Length and Maximum

 *  Resolved [rolyestemonio](https://wordpress.org/support/users/rolyestemonio/)
 * (@rolyestemonio)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/minimum-length-and-maximum/)
 * How to add minimum length and maximum on text field?

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

 *  [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/minimum-length-and-maximum/#post-9094993)
 * Hi, are you talking about changing the size of a field or the number of characters
   allowed to enter in a field?
 *  Thread Starter [rolyestemonio](https://wordpress.org/support/users/rolyestemonio/)
 * (@rolyestemonio)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/minimum-length-and-maximum/#post-9110903)
 * [@mbrsolution](https://wordpress.org/support/users/mbrsolution/) yes i am talking
   about it. I am planning the field will return an error if the input is not equal
   to the given numbers. Example maximum length is 10. If the user input below 10
   it will give an error.
    -  This reply was modified 8 years, 11 months ago by [rolyestemonio](https://wordpress.org/support/users/rolyestemonio/).
 *  [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/minimum-length-and-maximum/#post-9110963)
 * Hi, to limit the number of charecters allowed in a field add a value to the following
   area **Max length:** in the field settings.
 * The following is the description added by the developer in the plugin.
 * > Max length:
   >  Use to limit the number of allowed characters for a text field.
   > The limit will be checked when the form is posted. Can be used for text, textarea,
   > and password field types. This will not change the size of the field on the
   > form. To change that, use the size attribute (see below), or your add a width
   > attribute to the “Input text fields” setting on the Styles tab.
 * Let me know if you need more help.
 * Kind regards
 *  [Michael J Challis](https://wordpress.org/support/users/mikechallis/)
 * (@mikechallis)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/minimum-length-and-maximum/#post-9111070)
 * You have to use the regex feature
 * /^(0?[1-9])$/
 * explanation:
    ^ match start of the string (0? optional zero [1-9]) any number
   between 1 and 9 $ match end of string
 *  Thread Starter [rolyestemonio](https://wordpress.org/support/users/rolyestemonio/)
 * (@rolyestemonio)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/minimum-length-and-maximum/#post-9111297)
 * [@mbrsolution](https://wordpress.org/support/users/mbrsolution/) I already try
   that it will submit less than 10.
 * [@mikechallis](https://wordpress.org/support/users/mikechallis/) thanks it works.

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

The topic ‘Minimum Length and Maximum’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/si-contact-form_dde2be.svg)
 * [Fast Secure Contact Form](https://wordpress.org/plugins/si-contact-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/si-contact-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/si-contact-form/)
 * [Active Topics](https://wordpress.org/support/plugin/si-contact-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/si-contact-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/si-contact-form/reviews/)

## Tags

 * [contact-form](https://wordpress.org/support/topic-tag/contact-form/)

 * 5 replies
 * 3 participants
 * Last reply from: [rolyestemonio](https://wordpress.org/support/users/rolyestemonio/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/minimum-length-and-maximum/#post-9111297)
 * Status: resolved