Is it possible to implement the jQuery validation without using any plugins for this..
In my asp.net application, am using asp:textboxes to receive the inputs but the button is not an asp control, am calling the jQuery file at the button click event...I need to validate the inputs without using any plugins.....how can I achieve this....
I tried like put the requiredfield validator after textbox like,
<asp:TextBox ID="txtName" runat="server" ClientIDMode="Static"></asp:TextBox>
<div>
<asp:RequiredFieldValidator ID="reqValName" ControlToValidate="txtName"
runat="server" CssClass="validation" ErrorMessage="*Required">
</asp:RequiredFieldValidator>
</div>
and in my js file am checking the validation like,
$(function () {
$("#txtName").change(function () {
if ($("#txtName").val() == "") {
$(".reqValName").val();
}
});
its working when I try deleting the value in the textbox(making it as empty), if I leave from here it shows the "*Required" error....fine....I tried with blur function, its not working and also, I need to stop the button click event before clearing this validation errors, in server side if it is asp button, I never worried bout this, but here it is html, I dunno how to do, and also how can I use regular expression for this textbox.....
pluginfor jQuery. that being said, it's written using jQuery code. You could write your own code using regexp and onchange, submit, click, keyup/keydown/keypress, etc, a whole list of things using just jQuery.