Title: Custom validation tooltip (html)?
Last modified: April 5, 2020

---

# Custom validation tooltip (html)?

 *  Resolved [ISObits](https://wordpress.org/support/users/isobits/)
 * (@isobits)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/custom-validation-tooltip-html/)
 * When I leave a required field empty or insert invalid content an error ‘tooltip’
   appears above the field saying things like ‘Fill in this field’ or something.
 * I use YOOtheme’s Uikit and would like to replace this message with my custom 
   html:
 * <div uk-tooltip=”Bla di bla bla”></div>
 * Is there any hook to replace the HTML’s error tooltip with my own?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustom-validation-tooltip-html%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Konrad Chmielewski](https://wordpress.org/support/users/hwk-fr/)
 * (@hwk-fr)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/custom-validation-tooltip-html/#post-12633976)
 * Hello,
 * Thanks for the feedback. ACF Forms error messages `<div class="acf-notice -error
   acf-error-message">` are tied to ACF logic. I would advise to not change the 
   markup, or at least the class names.
 * If you want to add your own data attribute like `uk-tooltip`, you will have to
   add it with Javascript. Here is an example:
 *     ```
       (function($){
   
           if(typeof acf === 'undefined')
               return;
   
           acf.addAction('invalid_field', function(field){
   
               var $notice = field.$el.find('.acf-notice.-error');
   
               $notice.attr('uk-tooltip', 'My error');
   
           });
   
       })(jQuery);
       ```
   
 * Have a nice day!
 * Regards.

Viewing 1 replies (of 1 total)

The topic ‘Custom validation tooltip (html)?’ is closed to new replies.

 * ![](https://ps.w.org/acf-extended/assets/icon-256x256.png?rev=2071550)
 * [Advanced Custom Fields: Extended](https://wordpress.org/plugins/acf-extended/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/acf-extended/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/acf-extended/)
 * [Active Topics](https://wordpress.org/support/plugin/acf-extended/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/acf-extended/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/acf-extended/reviews/)

## Tags

 * [html](https://wordpress.org/support/topic-tag/html/)
 * [validation](https://wordpress.org/support/topic-tag/validation/)

 * 1 reply
 * 2 participants
 * Last reply from: [Konrad Chmielewski](https://wordpress.org/support/users/hwk-fr/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/custom-validation-tooltip-html/#post-12633976)
 * Status: resolved