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

Validation against Remote Data for Autocomplete

2 Answers 131 Views
Validation
This is a migrated thread and some comments may be shown as answers.
Kuldeep
Top achievements
Rank 1
Kuldeep asked on 08 May 2012, 07:01 PM
Hi,
How do I validate the autocomplete text-box has valid value form remote data and user has not typed anything in it using custom validator.

2 Answers, 1 is accepted

Sort by
0
Morne
Top achievements
Rank 2
answered on 11 May 2012, 02:13 PM
One suggestion is to have a function for on submission that does an ajax call with the input text to another page that returns either true or false, based on a script that checks the value against your remote data.

I am not sure if there is a simpler way that you can force the input to be validated without an ajax call, perhaps you can load all the remote data into a json and then validate against the json on submission?
0
Kuldeep
Top achievements
Rank 1
answered on 11 May 2012, 06:55 PM
Thanks Morne, I was able to use the custom function to do the validation, the only issue is I have more than one of these controls, how can I have a custom validation for multiple controls using Kendo Validator.
Tags
Validation
Asked by
Kuldeep
Top achievements
Rank 1
Answers by
Morne
Top achievements
Rank 2
Kuldeep
Top achievements
Rank 1
Share this question
or