Home Forums Front-end Issues Change validation message "Validation failed"


Change validation message "Validation failed"

    • probot

    • July 9, 2019 at 9:59 pm


    Ive found a few people requesting how to change the validation message: “Validation failed. 2 fields require attention” on a front-end form, but have not come across an answer. Is there a function to change this?


    • James

    • July 15, 2019 at 6:57 pm

    Hi there,

    Thanks for getting in touch.

    You can make use of the acf_reset_validation_errors() function to reset the current errors and then add some custom validation using this filter :

    You can see how the validation works on line 12688 of acf-input.js

    I hope this info helps. Thank you.

Viewing 2 posts - 1 through 2 (of 2 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.