In the examples they all show calling something like this.
$('#myform').validate(
rules: {
myfield: 'required'
}
)
However, in my pages when that's all I call it doesn't actually validate the form and show error messages (like in the examples). I have to add a call to $('#myform').valid() to get it to show validation the errors.
I'm using JQuery Validator 1.9.5 with JQuery 3.7.1.
Here's a stackblitz showing the issue.
You can modify the code to uncomment the call to form.valid() to see that it validates.
.validate()is the initialization..valid()is a trigger to validate, but it's not required. If you set it up correctly, clicking the submit button is also a trigger. Instead of linking to the code, you should be posting it here. I suggest you review the official documentation website for the plugin as well as the numerous questions tagged on SO.buttoninto atype="submit", then you won't need to call.valid(). Again, this is all laid out in the documentation.