In my application i want to validate an email text filed on keypress ,but how to do that i have used validation on keypress for numbers .Like i am posting what i have done
$("#start-date").keypress(function (e) {
if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {
$(".errmsg").html("Digits Only").show().fadeOut(3000);
return false;
}
});
<input id="start-date" type="text" name="start-date"><span class="errmsg"></span>
.errmsg {
color: red;
font-weight: bold;
}
Upper code is working properly.
but i want to validate my email field like it
<aui:input inlineField="true" label="" name="interviewCC" id="interviewCC" size="45" value=""></aui:input>
This field i want to validate with email validation ,how to do that,please somebody help ,Thank in advance