Make WordPress Core

Changeset 40634


Ignore:
Timestamp:
05/11/2017 07:17:11 PM (7 years ago)
Author:
swissspidy
Message:

Administration: Ensure validateForm also validates other input fields.

With this change, textareas and select inputs will be checked as well.

Props shadyvb.
Fixes #37540.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/common.js

    r40268 r40634  
    8080    return !$( form )
    8181        .find( '.form-required' )
    82         .filter( function() { return $( 'input:visible', this ).val() === ''; } )
     82        .filter( function() { return $( ':input:visible', this ).val() === ''; } )
    8383        .addClass( 'form-invalid' )
    84         .find( 'input:visible' )
     84        .find( ':input:visible' )
    8585        .change( function() { $( this ).closest( '.form-invalid' ).removeClass( 'form-invalid' ); } )
    8686        .length;
Note: See TracChangeset for help on using the changeset viewer.