When you call the submit function, the submit event does not fire. This is by design, it is assumed that if you run the view from the code, you have already done the necessary verification. (Note that this is true for the HTMLFormElement#submit function; this is not necessarily true for the wrapper libraries placed around it.)
In your example, I remove the click handler on the button. This is the submit button, so just put any appropriate logic in the submit event on the form. Alternatively, if you want, call validate() as part of the click button.
source share