Skip to content

Submit Propagation Nation v0.2.2

Compare
Choose a tag to compare
@haacked haacked released this 24 Aug 16:58
· 291 commits to main since this release
  • Fixes an issue when using client validation with an "ajax" form (via @haacked in #1).

NOTES
A form may have other event handlers attached to the submit event. For example, when implementing an Ajax form. Rather than call the
submit method directly which bypasses those handlers, if the form is valid, this allows the original form submit event to propagate.

However, if the form is invalid, this stops propagation of the form event entirely, even to other registered event handlers. This is usually what you want. If not, then we can add options later.

IMPORTANT: This requires that client validation registers its event handler on forms first.