The effect is as follows:
The way to solve this problem is to specify the error message to a specific location. The parameters of the validate() method can be customized. The sample code is as follows:
Male
Female
The running results are as follows:
In addition: If debug:true is added to the parameter, it will only be used for debugging the form and will not be submitted to the server; submitHandler: function() {} will perform some operations before the form is submitted to the server; remote can be used for Ajax Verification, there seems to be a small bug; there will be some problems when using ASP.NET in combination with validate. Please refer to the blog post of netizen .
Source code download