Support

Account

Home Forums Feature Requests Regex field ?

Solving

Regex field ?

    • will83

    • January 31, 2015 at 4:30 am

    Is there a field with a regex validation ?
    Example, if I want an URL field, I just have to add this regex in the “Regular Expression” field :
    _^(?:(?:https?|ftp)://)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)(?:\.(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)*(?:\.(?:[a-z\x{00a1}-\x{ffff}]{2,})))(?::\d{2,5})?(?:/[^\s]*)?$_iuS

    This can be provided with numerous regex, or we can share our regex with each other!

    Thank you

    • James

    • June 29, 2015 at 6:46 pm

    Hi @will83

    Thank you for the question.

    This feature is not available currently for the ACF plugin but you can be able to get this functionality from this plugin: https://wordpress.org/plugins/validated-field-for-acf/

    I have also sent this information to the developer so that this feature can soon see its way into the plugin.

  • can regex validations be added ? that plugin hasnt been updated for many years

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.