Conflict with jQuery-style ASP.Net Form Validators

3 posts, 1 answers
  1. jkregala
    jkregala avatar
    2 posts
    Member since:
    Sep 2009

    Posted 30 Sep 2010 Link to this post

    Hello telerik team.

    In some of our projects, we implement the extension from DelphicSage featured on this blog: http://www.delphicsage.com/home/blog.aspx?d=545 to enhance the aesthetics and usability of our websites. However, on one project we have used the Catcha control and noticed that it causes some sort of "conflict" with the extension and hinders it from running properly.

    What could be done about this? Thanks much.
  2. Answer
    Lini
    Admin
    Lini avatar
    2144 posts

    Posted 04 Oct 2010 Link to this post

    Hello,

    This seems to be caused by a problem in the ClearValidatorCallouts() method in the validators JavaScript code. The RadCaptcha control validator inherits the CustomValidator class, which does not need to have a ControlToValidate property set explicitly (see http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.basevalidator.controltovalidate.aspx for more information). The ClearValidatorCallouts() code from the page you gave, goes through all validators on the page and uses their "controltovalidate" property. If a validator does not have this property (such as a CustomValidator or RadCaptcha), the code will fail.

    You should contact the author and ask if there is a newer version available or you can apply this simple fix:

    change line 51 in validators.js from:

    WebForm_RemoveClassName(inputControl, 'error');                                                  

    to:

    if (inputControl) WebForm_RemoveClassName(inputControl, 'error');                                                  


    Sincerely yours,
    Lini
    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. jkregala
    jkregala avatar
    2 posts
    Member since:
    Sep 2009

    Posted 04 Oct 2010 Link to this post

    Wow nice! Thanks Lini! :)
Back to Top