Home Forums ACF PRO How to hook into front end ACF validation


How to hook into front end ACF validation

  • Without going into extensive explanation, what I’m trying to do is run a simple jquery function when (and if) my front-end ACF from finds any validation errors after the user clicks the submit button.

    I basically want to do an addClass and removeClass on an object elsewhere on the page if validation errors are found, which seems simple, but I don’t know how to hook into existing ACF jquery scripts.

    Anyone out there have a working example of this or point me in the right direction?

  • Hi @arcanepsyche

    ACF has Javascript hooks that allow you to customize the result. Please take a look at this page to learn more about it:

    Regarding your question, you can take a look at the “validation_complete” filter.

    Hope this helps!

  • Thank you for your speedy response! This lead me in the right direction and I think I will be able to figure it out.

    EDIT: I accidentally chose my reply as the answer after the page loaded… sorry about that!

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

The topic ‘How to hook into front end ACF validation’ is closed to new replies.