2

I'm looking for a way to validate the input of a form (name, email, price, etc.) on a cshtml page. I've searched the internet and every tutorial uses model to validate the input. Is there another way?

Thanks

2 Answers 2

1

Well with model class its a lot easier to validate a form in MVC if you are not using model classes for some reason then you have to use jquery plugins for form validation here are good plugins links.

http://formvalidator.net/

https://github.com/jzaefferer/jquery-validation

http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/

Sign up to request clarification or add additional context in comments.

Comments

0

If you want to implement client side validation you can try AngularJs. Angular JS Form Validation guide

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.