Ticket #209 (closed defect: fixed)
form-event for failed validation
| Reported by: | fries | Owned by: | mpo |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.4 |
| Component: | modules/kauri-forms | Version: | trunk |
| Keywords: | forms event validation | Cc: |
Description
There should be a way to catch an event when the validation finished. Maybe a boolean indicates whenever the form is valid or not. This could be handy to preform tasks that are not bound to 1 field or control.
Change History
Note: See
TracTickets for help on using
tickets.
I've added this in [1279]. please confirm/comment if this fits your needs.
I'm leaving the ticket open until then.
Some notes:
The event has been added on the level of the control, so the form inherits this behaviour (being a special composite-control).
Event-handler registration is via control.validationFinished(function() { /* body */) });
In the event-handler body 'this' will refer to the control, meaning this.isValid(), this.valueState and this.validationMessages should offer you all needed info about the actual validation-state of the control.
On the order of things: