Client: Fix forward-validation failure messages
Forward validation failures were never updated to use the new Failure object, so they ended up showing the default message. The problem was that `ui.invalidateForm' was replacing the Failure object with a new one with an empty message. This change just does the same thing as the change and save events. * src/client/Client.js (_forwardValidate): Invoke `#_genValidationMessages' and `_dataValidator.updateFailures'. Stop calling `ui.invalidateForm'.master
parent
53078919bb
commit
814b0ff3a0
|
@ -2046,7 +2046,13 @@ module.exports = Class( 'Client' )
|
||||||
// just as we would with the `submit' event.
|
// just as we would with the `submit' event.
|
||||||
if ( failures !== null )
|
if ( failures !== null )
|
||||||
{
|
{
|
||||||
this.ui.invalidateForm( failures );
|
this._genValidationMessages(
|
||||||
|
this._validationMessages,
|
||||||
|
failures
|
||||||
|
);
|
||||||
|
|
||||||
|
this._dataValidator.updateFailures( {}, failures );
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue