Forces/form-validation — Issue #3: Repeated calls to 'validate' bind multiple handlers
Author: bboyle
Created: 2011-11-07 04:57:12+00:00
State: open

Calling .forcesForms( 'validate' ) binds submit event handlers.

Calling this repeatedly binds handlers again without first unbinding (or checking if already bound) which causes issues with submit suppression in the submit done handler.

Note that call validate once immediately and a second time 'ondocumentready' might be a problem if the second call unbinds ands rebinds—it may be bound AFTER other dependent handlers that were relying on submit being stopped if invalid fields were present.