[Mono-bugs] [Bug 485458] New: CustomValidator incorrectly requires ControlToValidate to be set for client side scripting to work.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Mar 15 16:10:42 EDT 2009


https://bugzilla.novell.com/show_bug.cgi?id=485458


           Summary: CustomValidator incorrectly requires ControlToValidate
                    to be set for client side scripting to work.
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: x86-64
        OS/Version: RHEL 5
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Web
        AssignedTo: mhabersack at novell.com
        ReportedBy: zaltar at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Description of Problem:
A CustomValidator such as:
<asp:CustomValidator ID="CustomValidator" runat="server"
EnableClientScript="true" ClientValidationFunction="Validate"
OnServerValidate="Validate" >

will never run the client validation function.  Line 512 of
WebUIValidation_2.0.js will automatically set the validator to succeeded if
ControlToValidate is undefined.  This is contrary to MSDN documentation
(http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.customvalidator.aspx)
which states "It is possible to use a CustomValidator control without setting
the ControlToValidate property. This is commonly done when you are validating
multiple input controls or validating input controls that cannot be used with
validation controls, such as the CheckBox control."

Steps to reproduce the problem:
1. Create a customvalidator on a page that uses client side scripting.  Do not
set a control to validate.
2. View the page in any browser and submit the form.


Actual Results:
The client side script will not get called.

Expected Results:
The client side script should get called.


How often does this happen? 
Every time.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list