Customize: Prevent client-side validation from being cleared when no corresponding server-side validation is present.
See #36944. Fixes #39770. Merges [40319] to the 4.7 branch. git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40345 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
16c518a2b0
commit
a983452638
@ -4122,7 +4122,7 @@
|
|||||||
|
|
||||||
// Remove notification errors that are no longer valid.
|
// Remove notification errors that are no longer valid.
|
||||||
setting.notifications.each( function( notification ) {
|
setting.notifications.each( function( notification ) {
|
||||||
if ( 'error' === notification.type && ( true === validity || ! validity[ notification.code ] ) ) {
|
if ( notification.fromServer && 'error' === notification.type && ( true === validity || ! validity[ notification.code ] ) ) {
|
||||||
setting.notifications.remove( notification.code );
|
setting.notifications.remove( notification.code );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
Loading…
Reference in New Issue
Block a user