Regex Validation

Support General Regex Validation

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #43540
    eden22eden22
    Participant

    Been searching and cannot seem to see if this is possible or not.

    I want to be able to check what is entered into a field by using a regex expression. Is this possible?

    Background - I have a client who wants a CF to show a what3words (https://what3words.com) address. I want to be able to put a validation in on this field that will only allow entries that satisfy the criteria of a regex so that the value can be used in a url correctly

    thanks

    #43546
    PeterPeter
    Moderator

    Hello,

    For the HTML5 attribute, you can use the attribute pattern. For the advanced validation, you can use the remote validation. Then add your own regex to validate the input value.

    Following the documentation
    https://docs.metabox.io/validation/
    https://www.w3schools.com/tags/att_input_pattern.asp

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.