79570004

Date: 2025-04-12 03:49:42
Score: 1.5
Natty:
Report link

No, There is not a CSS only solution. The :user-invalid class is still applied even if the submit button has formNoValidate which is because CSS does not consider button attributes in styling.

The besetwork around that still rquires JS is to use JS to add a class to the form when submitting a formNovalidate button and then override the style based on that.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: divine omodunbi