I Use jquery.validate.js for field validation. Its display error messages as per declare in .js file for appropriate field.
I use this code for custom validation for email field.
<script type="text/javascript">
$().ready(function() {
$("#formcustomplan").validate({
email: {
required: true,
email: true
},
messages: {
email: "Email is required in valid format"
}
});
});
</script>
Its display message like that "Email is required in valid format" But I want that error message fetch email id and display it in error message. (Ex. if I enter test.com in email box. it should display "test.com is not valid email" in error message)