customvalidator

How do I validate that a list box is not empty (client side)

I'm working with ASP.NET 3.5. I have a list box that users must add items to (I've written the code for this). My requirement is that at least one item must be added to the listbox or they cannot submit the form. I have several other validators on the page and they all write to a ValidationSummary control. I would like this listbox valid...

How to create custom validator in Asp.net using ActiveRecord

i want to create custom validator for checking fields exists in multiple tables ...

How to not show BaseValidator.Text when using a ValidationSummary in ASP.NET

I'm using a bunch of different asp.net validation controls on a web form. Some of these have their Text property set to things like "* Error" or "You missed these fields". However, a few of the CustomValidator controls have blank Text properties. I left them blank on purpose because I'm adding the ErrorMessage dynamically depending ...

Why won't my ASP.NET CustomValidator validate?

I must be doing something wrong. I can't seem to execute my CustomValidator's ServerValidate method. I've got a Visual Basic ASP.NET page with a CustomValidator... <asp:TextBox ID="TextBox1" runat="server" /> <asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="Friendly message g...

Elegant way to make CustomValidator work with ValidationSummary messagebox

I have run into this problem before but never quite solved it. I have a form with several validators and also a CustomValidator. <asp:Label ID="lblMemberNum" runat="server" Text="Membership #:" CssClass="LabelMedium" ></asp:Label> <asp:TextBox ID="txtMemberNum" runat="server" CssClass="TextBox" ></asp:TextBox> <asp:RequiredFieldValidat...

Can you use an asp:customvalidator with an asp:ChangePassword control?

I'm looking for ideas on how to use a custom validation control for an asp:ChangePassword control. A simple attempt to set the "ControlToValidate" property on the asp:CustomValidator control results in: Control 'changePassword1' referenced by the ControlToValidate property of 'passwordValidation' cannot be validated. Thanks. ...

Adding a variable to a ASP.NET CustomValidator

I need to have a custom validator that can in some way incorporate a custom variable when calling the client-side javascript validation. This validator is used in a repeater, and every item in the repeater needs to use the custom validator, but validating against its own variable. Is this possible and how can I do it? Example, I nee...

Server side CustomValidator happening too late in .Net Wizard

Hi, I have a problem with a data collection wizard. My wizard has a number of client side validators, (regex, required field etc.) and they all work fine. I have just added a CustomValidator to one of the controls, that is calling some server side code. (unfortunaltely it does have to be server side). My problem is that this code see...

Updating ValidatorCallOut Error Message from Javascript

I am trying to update the error message for a CustomValidator that uses a ValidatorCallOut via javascript. Basically its checking to see if a number entered is an increment of a specified number. I have some code that will update the error message the first time it is run, but after that it will no longer update the error message, alth...

referencing the source control in the CustomValidator control

Hi, Is it possible to get a reference to the textbox that the customvalidator is 'attached' to in javascript? I want to place a red border around the texbox if it fails validation. ...

ValidationSummary with Client Side & Server Side Validation

Hey, If you use a CustomValidator control and a ValidationSummary control within an aspx page for server side validation you can set the ErrorMessage of the validator and its Text value will appear in place and the ErrorMessage value will be displayed within the ValidationSummary control. Nice. Now, what if I also perform validation o...

Client Side Validation for different control events

Hi, I have a custom validator attached to a textbox control as follows <td align="center" width="10px"> <asp:CustomValidator ID="validateDateText" ControlToValidate="dateTextBox" runat="server" OnServerValidate="ValidateDate" ClientValidationFunction="Validate_Date" EnableClientScript="true" Width="10px" CssCl...

customvalidator servervalidate parameters description

Hi The ServerValidate event of CustomValidator has 2 parameters: source and args. What each of them point out to? Any description of them please. Thank you ...

ASP.Net CustomValidator in GridView is not fired

I got a Gridview in an UpdatePanel with this EditTemplate: <edititemtemplate> <asp:textbox id="txtDistFrom" runat="server" text='<%# Bind("distFrom") %>' width="30" /> <asp:CustomValidator ID="valDistFrom" ValidateEmptyText="True" OnServerValidate="valDistFromTo_ServerValidate" ControlToValidate="txtDistFrom" Text="Missing" Tool...

customvalidator does not fire

I have the following code. When I press my save button, the three requiredfieldvalidators run fine and work properly. However my custom validator does not work. It does not fire the event at all. I have standard text boxes and a validationsummary control. Is there any reason why it might not be working? <asp:RequiredFieldValidator runat...

Silverlight CustomValidation on a class

If I add CustomValidation on a class or a class property, how do I trigger that from code? Thanks, Mark ...

What is the recommended method to Validate an ASP.net Control with an existing method?

I am wondering what the prefered method of validating user input in asp.net using an existing method call is. I have implemented this a couple of ways now and while they all work I get the sense that there might be a better or "optimal" method? I have an asp.net textbox <asp:TextBox ID="myTextBox" runat="server" /> I also have a cou...

Use Custom Validator at client side ? Shown ErrorMessage when script is wrong?

I have one problematic question on custom validator at client side in asp.net? This is my fileupload control and customvalidator to check that uploaded file is doc or not!!!! <asp:FileUpload Id="fu_1" runat="server" /> asp:CustomValidator ID="cv_fu1" runat="server" ControlToValidate="fu_1" ValidationGroup="submit" ClientValidationFunct...

WCF: Cannot find my custom validator specified in web.config - customUserNamePasswordValidatorType - - Could not load file or assembly ... - help?

So I've basically got everything up and running with wsHttpBindings and my WCF service using custom authentication over HTTPS. The issue I'm having is with the customUserNamePasswordValidatorType: <serviceCredentials> <!-- Use our own custom validation --> <userNameAuthentication userNamePasswordValidationMode="Custom" ...

Property Editor not registered with the PropertyEditorManager error on Custom Validation Tag (java)

Hello, I am using TomCat 5.5 with MyFaces 1.1 and am trying to implement a custom regex validation tag. My RegExValidator class looks like this: public class RegExValidator implements Validator, StateHolder { private String regex; private boolean transientValue = false; public RegExValidator() { super(); } public RegE...