WordPress.org

Ready to get started?Download WordPress

Forums

Fast Secure Contact Form
Use of regex (1 post)

  1. nbquidditch
    Member
    Posted 4 months ago #

    I've added a UK style postcode field to a form and have trying to use regex to validate the client's postcode and can't get it to work.

    I am usng the input field labelled regex but is not clear how the regex string should entered - enclosed in single or double quotes, brackets? As is without delimiters? As a result I'm not sure whether it is my regex string that is wrong.

    The raw regex string is:
    [code]
    /[A-Z]{1,2}[0-9][0-9A-Z]?\s?[0-9][A-Z]{2}/gi;
    [/code]

    Thanks

    Will

    https://wordpress.org/plugins/si-contact-form/

Reply

You must log in to post.

About this Plugin

About this Topic