Click here to Skip to main content
16,012,468 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi...
I wanted to do validation on confirm password using jquery.I did but that is not woking.
I show you my code.Please let me know what the error in this..
$(document).ready(function () {
$(#form1).validate(
{
rules:
{

<%=txtpass.UniqueID %>:
{
required: true,
minlength: 4,
maxlength:10

},
<%=txtRepass.UniqueID %>:
{
required: true,
minlength: 4,
maxlength: 10,
equalto: "#txtpass";

}




},
messages:
{


<%=txtpass.UniqueID >:
{
required: "Minimum 4 characters"


},

<%=txtRepass.UniqueID>:
{
required: "Confirm password does not match given password earlie"


}

}
});
});
Posted

1 solution

You "code" is some Javascript, that is, client-side code. Validation such thing as password on client side defeats the whole purpose of using password. You mentioned ASP.NET, but the question is not related to ASP.NET or any server-side technology. Actually, authentication does not make any sense if server side is not involved. So, this question simply makes no sense.

Before developing anything, you really, really need to get familiar with general ideas on how Web works.

—SA
 
Share this answer
 
Comments
1989priya 12-Mar-14 0:31am    
hi..
I would rembeber all those things that you told me.
According to you,password validation should be on server side instead of client side,But I
wanted to do at client side.
Sergey Alexandrovich Kryukov 12-Mar-14 0:32am    
Wanted? :-) But do you understand that it would be useless?
—SA
1989priya 12-Mar-14 0:35am    
In my sites..I saw when users used client side.I wanted to learn how to work on this,where
is error in my coding.
Sergey Alexandrovich Kryukov 12-Mar-14 11:33am    
Oh, you are talking about nothing. What does it mean "users used client side"?.. :-)
Please, let's stop it. I recommended you to learn how the Web works. That would be the better way of spending time.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900