For fields like Retype Password, Accept Terms and Conditions what is the best strategy to validate these fields both on the server and the client?
For fields like Retype Password, Accept Terms and Conditions what is the best strategy
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I used
DataAnnotationsand add the required, or other validation attributes. Then I use jQuery (or MS Validation) for client side. All is generated if you do it this way.If you have fields that are not in your regular model, I create new “view” models that match the view. Make your life easier and do this!