Support

Account

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

Helping

Change validation message "Validation failed"

  • Hi,

    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?

    Thanks

  • 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 : https://www.advancedcustomfields.com/resources/acf-validate_save_post/

    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)

The topic ‘Change validation message "Validation failed"’ is closed to new replies.