Closed bboyle closed 12 years ago
For example: a required field may be display as invalid. The underlying @required might be toggled to make the field valid. There needs to be a way to update the UI to reflect this.
@required
Consider:
$( '.invalid input' ).each(function() { this.removeAttribute('required'); }).forcesForms( 'checkValidity' );
where forcesForms( 'checkValidity' ) calls the .checkValidity() on the underlying DOM elements, and then updates the UI.
forcesForms( 'checkValidity' )
.checkValidity()
what's wrong with .trigger( 'change' )? Toggling required feels like a ‘change’ to me :)
.trigger( 'change' )
required
For example: a required field may be display as invalid. The underlying
@required
might be toggled to make the field valid. There needs to be a way to update the UI to reflect this.Consider:
where
forcesForms( 'checkValidity' )
calls the.checkValidity()
on the underlying DOM elements, and then updates the UI.