Required Validator Issue

8 posts, 0 answers
  1. Mark
    Mark avatar
    10 posts
    Member since:
    Jul 2013

    Posted 31 Jul 2013 Link to this post

    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.
  2. Nencho
    Admin
    Nencho avatar
    1458 posts

    Posted 05 Aug 2013 Link to this post

    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
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mark
    Mark avatar
    10 posts
    Member since:
    Jul 2013

    Posted 05 Aug 2013 Link to this post

    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.

                    var entry = new Telerik.Web.UI.AutoCompleteBoxEntry();
                    entry.set_text("TEXT");
                    entry.set_value("VALUE");
                    autoCompleteBox.get_entries().add(entry);

  5. Nencho
    Admin
    Nencho avatar
    1458 posts

    Posted 08 Aug 2013 Link to this post

    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
    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.
  6. David
    David avatar
    1 posts
    Member since:
    Jun 2013

    Posted 22 Oct 2013 Link to this post

    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.

    <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
  7. Bozhidar
    Admin
    Bozhidar avatar
    1103 posts

    Posted 24 Oct 2013 Link to this post

    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
    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.
  8. Rafael
    Rafael  avatar
    3 posts
    Member since:
    Jul 2011

    Posted 28 Jan 2014 Link to this post

    Is there some workaround in the meantime?

    Thanks
  9. Bozhidar
    Admin
    Bozhidar avatar
    1103 posts

    Posted 29 Jan 2014 Link to this post

    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
    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017