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

Validator Custom Rules run but validator.validate() returns function

1 Answer 73 Views
Validation
This is a migrated thread and some comments may be shown as answers.
jwize
Top achievements
Rank 1
jwize asked on 12 May 2013, 06:09 AM
I have been able to successfully use validator.validate() in my pages until now where I am loading content dynamically from a partial view. 

$("#mydiv").append( $.get ... partial view );

Here are the facts of what is happening. 
  1. I load partial page with a form  and validation rules dynamically. 
  2. When the form submits the validation code is executed and the form is prevented from posting to the server when it is invalid.. 
  3. When I run the validate() function it doesn't return false like it should (ex. myvalidationform.validate()  // returns and object instead of the expected false result when the data is invalid in the form. 
Please someone uncover this mystery for me. 


1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 14 May 2013, 06:52 AM
Hi Jaime,

I'm afraid that it is not clear what may be the cause for such behavior looking at the provided details. Therefore, please send us a small runnable sample in which this issue can be observed locally.

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