2

Just did a lot of searching but found no solution for this question. So is there any latest updates or discovery that we can change the default icon and text formatting for the setCustomValidity with CSS, jQuery, or JavaScript (see screenshot below)?

I tried $("#txtOrganization")[0].setCustomValidity("<b>Organization name</b> is required."); but no luck. Also, according to this post, the following is outdated:

::-webkit-validation-bubble

::-webkit-validation-bubble-arrow-clipper 

::-webkit-validation-bubble-arrow 

::-webkit-validation-bubble-message 

Thanks!

Change default icon and formatting of 'setCustomValidity'.

Antonio Ooi
  • 1,601
  • 1
  • 18
  • 32
  • 1
    I don't believe what you're trying to do is possible with the native validation notification. You'll need to build your own tools for it if you want to change the UI – Rory McCrossan Jun 19 '20 at 08:26
  • 1
    reopening since dupes are really old – mplungjan Jun 19 '20 at 08:31
  • @RoryMcCrossan : Yup, I know, just want to save some work by simply modifying the styles whenever possible. The default behavior is useful when you have a longer form and showing error message above the form will not be visible to the user. Redoing similar feature will be lot of work though. – Antonio Ooi Jun 19 '20 at 08:32
  • @mplungjan : Yeah... many answers were posted in **2011**, which no longer valid. Thanks for reopening! – Antonio Ooi Jun 19 '20 at 15:19

0 Answers0