4 mw.hook( 'htmlform.enhance' ).fire( $( document ) );
7 mw.hook( 'htmlform.enhance' ).add( function ( $root ) {
8 // Turn HTML5 form validation back on, in cases where it was disabled server-side (see
9 // HTMLForm::needsJSForHtml5FormValidation()) because we need extra logic implemented in JS to
10 // validate correctly. Currently, this is only used for forms containing fields with 'hide-if'.
11 $root.find( '.mw-htmlform' ).removeAttr( 'novalidate' );
14 }( mediaWiki, jQuery ) );