I’m using the
acf_form() function to render a frontend form, however I need to customise the validation error message that says
Validation failed. X fields require attention, and cannot find a way to do so without hacking the code.
The error message is generated in the
showErrors() function inside
acf-input.js – are there any hooks to filter the message? Or any actions that will be triggered when ACF notice is updated?
acfL10n['Validation failed'] = 'My validation message';
acfL10n['1 field requires attention'] = 'One invalid field';
acfL10n['%d fields require attention'] = 'More invalid fields';
I haven’t found better way.