When using a required validator with the autocompletebox I may have come across a issue. After the control is initially rendered to the page and you try to submit the validator will show correctly that the user didn't enter a value. However if the user enters a value/selects item and then removes it leaving an empty box the validator will no longer fire because it thinks the autocompletebox is populated.
To give background I am using Asp .Net 4.5 and the new unobtrusive validation on the client side. I am more concerned about this issue on the client side validation currently then on the server side.
I came across this post and didn't know if it would apply or not.
To give background I am using Asp .Net 4.5 and the new unobtrusive validation on the client side. I am more concerned about this issue on the client side validation currently then on the server side.
I came across this post and didn't know if it would apply or not.
7 Answers, 1 is accepted
0
Hello Mark,
Would you specify which version of our controls do you use at your end? There was a similar issue, regarding the behavior of the RadAutoCompleteBox, when a RequiredFieldValidator is used, but it is already fixed with our latest official release. In addition, here is a video, demonstrating the behavior at my end.
Regards,
Nencho
Telerik
Would you specify which version of our controls do you use at your end? There was a similar issue, regarding the behavior of the RadAutoCompleteBox, when a RequiredFieldValidator is used, but it is already fixed with our latest official release. In addition, here is a video, demonstrating the behavior at my end.
Regards,
Nencho
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0

Mark
Top achievements
Rank 1
answered on 05 Aug 2013, 03:41 PM
I am currently using 2013.2.611.45 with .Net 4.5 new unobtrusive validation
Your demo video is a little different then what I am describing. Say you search and select "Around the Horn", then before you click the submit button you remove it by clicking the little x and THEN submit it. The page comes back as valid because it thinks you still have that value "Around the Horn" is in the list.
I have also found a second issue that if you add items to the AutoCompleteBox solely from the client side that the required field validator doesn't think anything is in the box until you add an item the manual way. So doing something like below will show required field validator to show even though you have added items.
Your demo video is a little different then what I am describing. Say you search and select "Around the Horn", then before you click the submit button you remove it by clicking the little x and THEN submit it. The page comes back as valid because it thinks you still have that value "Around the Horn" is in the list.
I have also found a second issue that if you add items to the AutoCompleteBox solely from the client side that the required field validator doesn't think anything is in the box until you add an item the manual way. So doing something like below will show required field validator to show even though you have added items.
var entry = new Telerik.Web.UI.AutoCompleteBoxEntry(); entry.set_text("TEXT"); entry.set_value("VALUE"); autoCompleteBox.get_entries().add(entry);
0
Hello Mark,
Both of your observations are absolutely correct. For the first issue - we are currently working on fixing it and regarding the programmatic adding of an Entry - I have just forwarded it to our developer team for further investigation. Thank you for pointing that out.
Regards,
Nencho
Telerik
Both of your observations are absolutely correct. For the first issue - we are currently working on fixing it and regarding the programmatic adding of an Entry - I have just forwarded it to our developer team for further investigation. Thank you for pointing that out.
Regards,
Nencho
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0

David
Top achievements
Rank 1
answered on 22 Oct 2013, 09:03 AM
Hi,
I have a similar issue. If I type into the auto complete box and select an entry, the requiredfieldvalidator fires thinking nothing is in the box. You can still click the button and it goes away, but it is very confusing to the user.
Is this the issue you are fixing? I'm on Q3 2003.
Regards,
Dave
I have a similar issue. If I type into the auto complete box and select an entry, the requiredfieldvalidator fires thinking nothing is in the box. You can still click the button and it goes away, but it is very confusing to the user.
<
telerik:RadAutoCompleteBox
ID
=
"acbSurname"
runat
=
"server"
DataSourceID
=
"odsSurname"
DataTextField
=
"FullName"
DataValueField
=
"PersonID"
InputType
=
"Text"
MinFilterLength
=
"3"
TextSettings-SelectionMode
=
"Single"
OnDataSourceSelect
=
"acbSurname_DataSourceSelect"
>
<
asp:RequiredFieldValidator
ID
=
"rfvSurname"
runat
=
"server"
ValidationGroup
=
"Save"
ControlToValidate
=
"acbSurname"
ErrorMessage
=
"Surname must be completed"
/>
<
asp:Button
ID
=
"btnSave"
runat
=
"server"
ValidationGroup
=
"Save"
/>
Is this the issue you are fixing? I'm on Q3 2003.
Regards,
Dave
0
Hello David,
Yes, this is the same issue, and we are still working on resolving it. You can keep track of our release notes to see when a fix will be available.
Regards,
Bozhidar
Telerik
Yes, this is the same issue, and we are still working on resolving it. You can keep track of our release notes to see when a fix will be available.
Regards,
Bozhidar
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
answered on 28 Jan 2014, 03:50 PM
Is there some workaround in the meantime?
Thanks
Thanks
0
Hello Rafael,
All the known issues with RadAutoCompleteBox and ASP.NET validators will be resolved in our upcoming 2014 Q1 release, which will come out on the 19th of February. However there isn't any workaround that you can easily apply to correct them until then.
Regards,
Bozhidar
Telerik
All the known issues with RadAutoCompleteBox and ASP.NET validators will be resolved in our upcoming 2014 Q1 release, which will come out on the 19th of February. However there isn't any workaround that you can easily apply to correct them until then.
Regards,
Bozhidar
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.