Fast Secure Contact Form
regex question (2 posts)

  1. peter.twi
    Posted 2 years ago #

    Hi - We have a form that asks for an individual's age. Amazing what's out there.... A site called UtilMill.com lets you more or less use English and common sense to come up with a regex.

    For me, I wanted 3-15, inclusive, as all that's valid - i.e., 3,4,14,15 are among those acceptable; "A7" or 22 would both be rejected.

    The site said this was "the ticket;"

    But when I entered it PRECISELY as above, it did not get the job done.

    ... Thanks.


  2. Mike Challis
    Plugin Author

    Posted 2 years ago #

    The regex will have to begin and end with a forward slash

    Example: If you want numbers in a text field type but do not allow text, use this regex: /^\d+$/ Can be used for text, textarea, date and password field types.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Fast Secure Contact Form
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic