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:
Pascal Birchler 2017-03-28 07:21:20 +00:00
parent 16c518a2b0
commit a983452638
1 changed files with 1 additions and 1 deletions

View File

@ -4122,7 +4122,7 @@
// Remove notification errors that are no longer valid.
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 );
}
} );