0

ok i have a complete form in my database as row for example name of the field ,is mandatory, sortid, regularexpression, datatype, maxlength , default value etc. So the form is completely dynamic.

now i want to perform the client side validation on the form . What will be the best practice for doing that? like i have to see that if the field is mandatory check it for null and if not then leave it on the client side . i am thinking about setting hidden field for it .

can u guys guide me better in this scenario.

2 Answers 2

1

You could dynamically construct javascript to test this form on client. Or you could use jquery.validate plugin and do right mark-up of your html.

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

Comments

1

You might want to check out this project, which is for generating dynamic forms in MVC.

If you download the most recent code theres stuff in there for doing client side validation with jquery

http://mvcdynamicforms.codeplex.com/

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.