customvalidator

ASP.NET validators - stop validating on first failure

Is there a method to stop validators from being evaluated if a previous validator is found to be not valid - at a control level? For example, if I create a text box with a RequiredFieldValidator, a RegularExpressionValidator and a custom validator, I do not want the custom validator to be evaluated if the RequiredFieldValidator or Regul...

Custom validator in usercontrol in wizard control validation issue

Hello everybody. i have a checkbox which is in a usercontrol and the usercontrol is in an wizardcontrol and the wizardcontrol is on a content page which has a masterpage. the checkbox must be checked before the wizard controls finishes. the checkbox and the customvalidator are on the last step of the wizardcontrol. now everything work...

customvalidator can't find controltovalidate

iam having a problem finding a textbox inside createuserwizard which is inside a contentplaceholder i have a custom validator for this textbox ..now when i put this customvalidator outside createuser wizard it says "cannot find controltovalidate control id CaptchaValue " heres is a row inside my createuserwizard <CreateUserWizard........

customvalidator can't find controltovalidate

iam having a problem finding a textbox inside createuserwizard which is inside a contentplaceholder i have a custom validator for this textbox ..now when i put this customvalidator outside createuser wizard it says "cannot find controltovalidate control id CaptchaValue " heres is a row inside my createuserwizard <CreateUserWizard.......

Can you make CustomValidator's ErrorMessage show up in a TextBox?

I have the following code: <asp:TextBox runat="server" ID="textBox1" /> <asp:CustomValidator ID="validator1" runat="server" ErrorMessage="error message" OnServerValidate="thing_to_validate" Display="Dynamic"></asp:CustomValidator> This allows the error message to show up BELOW the textbox when validating. My question is, how can I m...

How to hide / show CustomValidation validation messages without postback

UPDATE : Figured it out.. The objects I was passing to the ValidatorHookupControl were'nt being set properly (were null). Now that they are, the messages are currectly dissapearing when the hooked up control looses it's focus. ORIGINAL POST .. Hi, I have some ClientValidation controls that have ClientSideValidation methods which wo...

control names in a custom validator .NET Client Side Validation

Hi I have a gridview with three columns of textboxes. It can have as many rows as necessary but its usually only about 5 rows. Each row needs to be validated. I want to create a client side validator that sums 2 of the columns together and compares it with the third column to check that the user has entered the data correctly. Just in...

How to determine which custom validator will fire first

I have two custom validators that are in the same validation group. This validation group is launched by one button. My question is, in what order will the custom validators fire in? It appears that the validator that is placed earlier in the aspx page fires first, but I don't want to rely solely on this. Any thoughts? ...

How to set width of a custom validator

Hey, Does anybody know of a way to set the width of a custom validtor so that the error message text will wrap if it exceeds the specified width? I have a user control that contains a custom validator which the containing page can set the error message on based on specific validation results. The user control sits within a table cell ...

Validate on multiple errors with one CustomValidator

I am trying to figure out how to use Validation on Business Objects. Until now I have only seen examples on CustomValidator that checks for only 1 error. I have two fields with DateTime input that should check for 3 or more errors. I guess normally I should check on client, then on server, last on database level. If I get an error on a f...

asp:CustomValidator / OnServerValidate

I have a CheckBoxList that I am trying to validate that at least one of the checkboxes is checked. Markup: <asp:CustomValidator ID="RequiredFieldValidator8" ValidationGroup="EditArticle" runat="server" ErrorMessage="At least one Category is required." OnServerValidate="topic_ServerValidate" /> <asp:CheckBoxList id="checkboxlis...

ASP.NET Custom Validator Error Message: Control referenced by the property cannot be validated

Hello, I use ASP.NET and have a Button and a CustomValidator, which has to validate the button. <asp:Button ID="saveButton" runat="server" OnClick="SaveButton_Click" Text="Speichern" CausesValidation="true"/> <asp:CustomValidator runat="server" ID="saveCValidator" Display="Static" OnServerValidate="EditPriceCValidator_ServerVali...

ASP.NET CustomValidator trying to match to System.EventHandler?

I have markup so: <asp:TextBox runat="server" ID="Accountname" /> <asp:CustomValidator runat="server" ControlToValidate="Accountname" OnServerValidate="Accountname_CheckUnique" meta:resourcekey="ACCOUNTNAME_UNAVAILABLE" /> Codebehind so: protected void Accountname_CheckUnique(object source, ServerValidateEventArgs arguments) { ar...

JAXB does not call setter when unmarshalling objects

Hi all, I am using JAXB 2.0 JDK 6 in order to unmarshall an XML instance into POJOs. In order to add some custom validation I have inserted a validation call into the setter of a property, yet despite it being private, it seems that the unmarshaller does not call the setter but directly modifies the private field. It is crucial to me...

Enable/disable RequiredValidator on client-side / CustomValidator not firing

I've got a drop-down where the user selects a Country. It is a required "field". Next to it, there is a textfield named State. If the user selects US, then the field State is required. If the user selects e.g. Sweden, the State is not required, since Sweden has no states. Example code: <asp:DropDownList runat="server" ID="Country"></a...

CustomValidator to validate multiple controls

Is there a way to have the custom validator take the input from two controls, say for example two check boxes and make sure that only one is checked? Or am I going about this all wrong, and more importantly if I am could you point me in the right direction? Even if this is the wrong direction actually I would like to know how to do thi...

Customvalidator: Check if radiobuttonlist contains a selected item.

I have a radiobuttonlist with two items, Yes or No. The radiobuttonlist control has a customvalidator that needs a servervalidation function and a javascript clientvalidationfunction. Could you help me? The function in this message works but only when i actually have choosen one of the two listitems, when no listitem is selected the vali...

Wrap CustomValidator in a UserControl, but allow access to it

I've got a UserControl that is essentially just a TextBox with optional built-in validators to it. At the moment this is just a RequiredFieldValidator and RegexValidator. It's easy to just expose properties on the UserControl which get passed through to these validators and allow me to set the RegEx for example. Now I'd like to add a ...

[ASP.NET] A CustomValidator doesn't need to have it's ControlToValidate property set, so...

Hi: I've just finished reading up on the CustomValidator control and I have a question. In the book I'm reading, it says that a CustomValidator doesn't need to have it's ControlToValidate property set and it gives a few examples of that usage. But in one example where ControlToValidate isn't used, the OnServerValidate function has a tim...

Zend Framework Form Element Validators - validate a field even if not required

Is there a way to get a validator to fire even if the form element isn't required? I have a form where I want to validate the contents of a texbox (make sure not empty) if the value of another form element, which is a couple of radio buttons, has a specific value selected. Right now I'm doing this by overriding the isValid() function o...