Will de la Vega Will de la Vega - 1 year ago 119
TypeScript Question

Is there an event in Angular2 rc4+ to tell me when a form is valid?

I am using

, custom validators, etc. I need to capture in an event handler when the form becomes valid/invalid, not a property, but an actual event in ts code.

I took a look to the documentation but I wasn't able to find something like:

is just a placeholder for the name of the actual event I am looking for.

Answer Source

Subscribe to statusChanges

.filter(s => s == 'VALID')
.subscribe(val => onValid())
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download