This is a migrated thread and some comments may be shown as answers.

Tabstrip and Validation

1 Answer 280 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Joey
Top achievements
Rank 1
Joey asked on 08 Feb 2013, 05:06 PM
I'm using the out-of-the box data annotations and letting MVC handle the client-side validations for me. I'm also using a tabstrip to segregate different sections of input.  However, all of the input is in the same form.

What I've found is that if I go to a different tab other than the first one and trigger the form submit, the validation doesn't fire and the form gets submitted.

Is there any way to avoid this?  How should I be going about it?

Thanks.

-Joe Benckert

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 12 Feb 2013, 12:19 PM
Hello Joey,

Basically the validator should be working even on multiple tabs.

I created a JSBin example which you can try and see that the form is not submitted until the validation passes.

http://jsbin.com/uzayuj/2/edit

I assume that in your case you are loading the tabs with Ajax and they are not validated because the inputs does not exist into the DOM before the content is loaded.

Kind Regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
TabStrip
Asked by
Joey
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or