Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用多封电子邮件和正则表达式进行jquery验证_Jquery_Regex_Validation_Email - Fatal编程技术网

使用多封电子邮件和正则表达式进行jquery验证

使用多封电子邮件和正则表达式进行jquery验证,jquery,regex,validation,email,Jquery,Regex,Validation,Email,我没有在网上找到解决方案,javascript不是我的强项。任何整合验证的尝试也失败了 我正在使用以下代码检查我的表单: $('#form').validate({ errorContainer: ".form_errors", showErrors: function (errorMap, errorList) { $(".form_errors").html("<span>all red marked borders are required.&l

我没有在网上找到解决方案,javascript不是我的强项。任何整合验证的尝试也失败了

我正在使用以下代码检查我的表单:

$('#form').validate({
    errorContainer: ".form_errors",
    showErrors: function (errorMap, errorList) {
        $(".form_errors").html("<span>all red marked borders are required.</span>");
        this.defaultShowErrors();
    },
    invalidHandler: function(form, validator) {
    },
    errorPlacement: function(error, element) {
    },
    highlight: function(element) {
        $(element).closest('.check').addClass('error_border');
    },
    unhighlight: function(element) {
        $(element).closest('.check').removeClass('error_border');
    },
});
如何使用上面的jquery验证代码


谢谢你的帮助

jquery Validation具有内置的
电子邮件
验证程序,您为什么要自己进行验证?使用regex,我想将电子邮件的最大数量限制为5封。有没有更简单的解决方案?您的电子邮件必须用分号左右隔开。像往常一样进行拆分和验证。如何使用上面的代码进行拆分和验证?我做不到-谢谢你的帮助。
<input type="email" id="email" name="email" placeholder="eMails" autocomplete="off" class="check" required multiple>
^(([a-zA-Z0-9_\-\.\+]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)(,\s?|\s?)){1,5}$