Validate Email For A Specific Domain
I am trying to get this to work without any success
https://forum.jquery.com/topic/validating-multiple-domain-email-addresses-which-a-form
If anyone has a working example, I would greatly appreciate any assistance. I can not even begin to describe how many hours I have put into this without success. Any help is appreciated...
<script src="
http://code.jquery.com/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="
http://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.js" type="text/javascript"></script>
<script>
$().ready(function() {
// validate the comment form when it is submitted
$("#commentForm").validate();
// validate signup form on keyup and submit
$("#helpdeskform").validate({
rules: {
name: "required",
name: {
required: true,
minlength: 2
},
password: {
required: true,
minlength: 5
},
confirm_password: {
required: true,
minlength: 5,
equalTo: "#password"
},
email: {
required: true,
email: true,
matches: '.+@domain.edu'
},
topic: {
required: "#newsletter:checked",
minlength: 2
},
agree: "required"
},
messages: {
name: {
required: "Please enter a username",
minlength: "Your username must consist of at least 2 characters"
},
password: {
required: "Please provide a password",
minlength: "Your password must be at least 5 characters long"
},
confirm_password: {
required: "Please provide a password",
minlength: "Your password must be at least 5 characters long",
equalTo: "Please enter the same password as above"
},
email: {
required: "Please enter a valid email address",
},
agree: "Please accept our policy"
}
});
</script>