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

Validation messages in Grid popup not being removed when valid

3 Answers 334 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Stan
Top achievements
Rank 1
Stan asked on 04 Feb 2015, 03:06 AM
Hi,
We are hitting a scenario where the validation messages for an input field in a grid popup editor is not being removed when a valid value is entered. This can be replicated using the standard popup demo.

Popup editing demo

To replicate this you
- Click on add new record
- Delete the Units in Stock and press tab (you get the UnitsInStock is required error)
- Set the Units in Stock back to 1 (the default value) and press tab

The validation message is still shown even though the value is now correct. This only seems to happen if you set the value back to what it was before you deleted it. If you do the same steps above but change the number to 2 in the third step the message is removed correctly.

Is this a bug or is there anything we can do to force the validation to execute again and clear the message?

3 Answers, 1 is accepted

Sort by
0
Stan
Top achievements
Rank 1
answered on 04 Feb 2015, 04:39 AM
Small correction in step 3, should be

- Set the Units in Stock back to 0
0
Petur Subev
Telerik team
answered on 06 Feb 2015, 06:39 AM
Hello Stan,

Indeed there seems to be an issue when validating value which was the previous valid one. This happens because in order to perform validation the popup form uses a kendo MVVM ViewModel and waits for its value to change. If the value is not valid, the model is not updated. And since the value was the same as the previous value no change is triggered and no validation occurs.

A work-around to force the validation explicitly:

http://dojo.telerik.com/@pesho/iyUqo

Kind Regards,
Petur Subev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Stan
Top achievements
Rank 1
answered on 11 Feb 2015, 12:01 AM
Thanks, that seems to work.
Tags
Grid
Asked by
Stan
Top achievements
Rank 1
Answers by
Stan
Top achievements
Rank 1
Petur Subev
Telerik team
Share this question
or