Home › Forums › ACF PRO › Fire Validation Manually › Reply To: Fire Validation Manually
Hello James,
In the admin I have created a new button next to publish button,
say MyCustom button,
on click on that button I wanted ACF validation to take place,
hence I have made a jQuery function
$(‘#MyCustom’).click(function(e){
acf.validation.fetch( $(‘#post’) );
});
It works like a charm when there is a validation missing,
But when there are no validation error in the form
then then it submits the form.
Note that my intension is not to submit the form and hence I created another button called MyCustom,
I want this because I want to perform some actions before submitting but after validation state.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.