Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

validator.validate() giving wrong results

$
0
0

Hi,

 I will be referring to the following sample: http://dojo.telerik.com/@bhaidar/EYUFu

 

The sample validates a textbox to have only 4 digits.

When I enter wrong data, the validation message is shown. Then, I press "Save" button, validation message is gone + the validator.validate() says it is valid, while data is still wrong.

Why do I need to call validate() method? Because, I offer the user a form with a Save button, so even if error messages are shown on page, I need to make sure things are valid before saving.

Notice that, once validate() says the form is valid, now the textbox has the "k-valid" class. Hence, even if I enter wrong data again, the validation message won't be shown anymore!

 

Appreciate your assistance.

 

Regards
Bilal


Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>