:-moz-submit-invalid CSS pseudo-class

Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.

The :-moz-submit-invalid CSS pseudo-class is a Mozilla extension that represents any submit <button> on forms whose contents aren't valid based on their validation constraints.

By default, no style is applied. You can use this pseudo-class to customize the appearance of the submit button when there are invalid form fields.

Syntax

css
:-moz-submit-invalid {
  /* ... */
}

Specifications

Not part of any standard.

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
:-moz-submit-invalid
Non-standard
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – No support
Firefox 4 – 87 (Release date: 2011-03-22)
unknown Support unknown
Firefox – No support
Firefox 88 (Release date: 2021-04-19)
footnote , disabled
disabled From version 88 users must explicitly set the layout.css.moz-submit-invalid.enabled preference to true. To change preferences in Firefox, visit about:config.
footnote From Firefox 88 the feature has been placed behind a flag. See bug 1694129.
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Chrome Android – No support
Chrome Android
footnote No support
Firefox for Android – No support
Firefox for Android 4 – 87 (Release date: 2011-03-29)
footnote Removed in 88 and later
footnote From version 88, the feature has been withdrawn. See bug 1694129.
Opera Android – No support
Opera Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – No support
WebView Android
footnote No support
WebView on iOS – No support
WebView on iOS
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Non-standard. Check cross-browser support before using.
See implementation notes.
User must explicitly enable this feature.
Has more compatibility info.

See also