views:

30

answers:

0

I have a simple form with standard MVC Clientside Validation (minimalist sample: one text box displayed with standard LabelFor/TextBoxFor/ValidationMessageFor sequence. The model property is marked with the [Required] and [StringLength] attributes.). It works exactly as expected if I navigate to that form (i.e., http://localhost/Batch/Filter) and show it in it's own browser window. (By as expected, I mean that validation message and formatting occurs as soon as the textbox loses focus with invalid values AND the the submit button is ineffective as long as there is an invalid value.)

If I use that same url as the URL to populate a jqModal window, none of the clientside validation is effective. There is no error indication if I put an invalid value in the textbox and move away from it, and the form is submitted with invalid data. The server side validation works, and if I return the form to the window with ModelState errors, the errors are shown in normal fashion.

I have currently used the jquery.form.js ajaxForm() function to "ajaxify" the form and return it's output to the jqModal window. But it still won't make the validation events work.

What do I need to do to use the Client side libraries?

Thanks.