Home › Forums › ACF PRO › Custom validation. Validation error message does not disapear › Reply To: Custom validation. Validation error message does not disapear
I think I narrowed it further down. I think it is somehow some javascript which does not remove the error message from a field with custom validation.
If I added this in the beginning of my code in the validation function
if (($key = array_search($input, $GLOBALS['acf_validation_errors'])) !== false) {
unset($GLOBALS['acf_validation_errors'][$key]);
}
The text in the message dissapears, but the red error bar still stays
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.