• Resolved JacobTheDev

    (@revxx14)


    Hi there, I’m exploring different booking plugins for a library, and I like a lot about yours, but do you have a way to validate a field with regex? I’d like to add a field for “library card number” that simply matches a pattern, with the form unable to be submitted if the pattern isn’t matched.

    If there’s a way to do this via a hook or something, I can certainly go that route, I just wasn’t sure where to begin. Thanks for your help!

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hi,

    The plugin doesn’t have a field that directly supports a regex validation, however you can extend the validation behavior by adding a piece of JavaScript.

    For example, the following piece of code extends the validation of the email field:

    https://codeshare.io/zyrBDN

    Thank you for using the plugin!

Viewing 1 replies (of 1 total)
  • The topic ‘Validate field with regex?’ is closed to new replies.