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

[Solved] BUG - Custom Validation in particular situation

1 Answer 121 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Fabio Laserra
Top achievements
Rank 1
Fabio Laserra asked on 10 Feb 2010, 09:03 AM
Hello,
I would just notify a bug. It occurs in this situation: you use customvalidator in a radcombobox that has AllowCustomText="true". The client function associated to customvalidator is fired only when the radcombobox losts the focus, not when you click on submit button. If you set AllowCustomText="false" all works as espected (so the function is fired when radcombobox losts focus AND when you submit the page).

Bye
FL

1 Answer, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 16 Feb 2010, 03:17 PM
Hello Fabio Laserra,

I tested what you are describing and noticed the following behavior of the CustomValidator - its client validation function fires only if the value of the validated control, in this case the RadComboBox, is not an empty string.

When you set the AllowCustomText property of the RCB to true it renders with an empty input. I guess if you then click on submit, the validation function will not fire, whereas if you type some text in the input first and then click on submit, the validation function will fire. (The case with focus/blur is identical.)

You can avoid this by setting the CustomValidator's property ValidateEmptyText to true.

Best wishes,
Simon
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
ComboBox
Asked by
Fabio Laserra
Top achievements
Rank 1
Answers by
Simon
Telerik team
Share this question
or