jonjamz / blaze-forms

Dead easy reactive forms with validation (Meteor).
https://atmospherejs.com/templates/forms
MIT License
113 stars 11 forks source link

Add support for an array of events in `validationEvent` #52

Closed valikron closed 9 years ago

valikron commented 9 years ago

You can define "keyup" or "change" event for an element (this also need to be documented somewhere). For a number field for example I need both events. Because the arrows of the number field triggers only the change event. Is it possible to define both events at the same time?

jonjamz commented 9 years ago

Yes, although this is something I can handle more gracefully in v2.0.0. You'd do this:

validationEvent: 'change .reactive-element, keyup'

See https://github.com/meteortemplates/forms/blob/master/lib/module.coffee#L718.

valikron commented 9 years ago

Great! Thank you :)

jonjamz commented 9 years ago

The following is now supported in version 1.13.1:

validationEvent: ['change', 'keyup']