validators

Using ASP.NET AJAX PageMethods and Validators

I have a basic CRUD form that uses PageMethods to update the user details, however the Validators don't fire off, I think I need to manually initialize the validators and check whether the validation has passed in my javascript save method. Any ideas on how to do this? ...

Validation framework for business app built on Spring 2.5

Hi, What could the best strategy for writing validation layer for mid-enterprise level business application built on Spring 2.5 I know that Spring provides facility where we can implement Validator interface and write validation logic in validate method. But this will be restricted to only web requests coming through spring controller....

Rails model validators break earlier migrations

I have a sequence of migrations in a rails app which includes the following steps: Create basic version of the 'user' model Create an instance of this model - there needs to be at least one initial user in my system so that you can log in and start using it Update the 'user' model to add a new field / column. Now I'm using "validates...

Do standard asp.net validators work with Ajax and update panel?

I am having issues with validators not firing (No expected error messages showing) when using Page.Validate() from code behind. The validators are placed inside an Ajax updatepanel. It seems there are downloadable Ajax versions of the validators. I am not sure if I need these or if VS 2008 SP1 has them already. When the form is posted t...

Can you have custom client-side javascript Validation for standard ASP.NET Web Form Validators?

Can you have custom client-side javascript Validation for standard ASP.NET Web Form Validators? For instance use a asp:RequiredFieldValidator leave the server side code alone but implement your own client notification using jQuery to highlight the field or background color for example. ...

How can I set the ValidationGroup dynamically

Hi, I have a ASP.NET 2.0 webpage with 2 UserControls (.ascx). Each UserControl contains a bunch of validators. Placing a ValidationSummary on the page will display all validation errors, of both UserControl's. Placing a ValidationSummary in each UserControl will display all the errors of both controls twice. What I want is a Validatio...

Struts2 Annotation-Validators for Invalid Chars

Heyall, While using Struts2, I am using several annotations to do my validations inside the Model class, in the set() methods, like: @RequiredStringValidator(message = "Name is required") @StringLengthFieldValidator(message = "Name must be between 5 and 60 characters", minLength = "5", maxLength = "60") p...

ASP.Net Validator Default Style

I'm using several variants of the Validator controls (RequiredFieldValidator, CompareValidator, etc) and am using the CssClass property of the validator. I can see (via Firebug) that the class is being applied, but the validator control itself is adding a style element to it, namely color: red. But I don't want that. I want the contro...

Asp.Net : Extended range validation

Hi, I'm using Asp.Net 2.0. I have a scenario where i need to check a user input against any of two ranges. For e.g. I need to check a textbox value against ranges 100-200 or 500-600. I know that i can hook up 2 Asp.Net RangeValidators to the TextBox, but that will try to validate the input against both the ranges, an AND condition,if yo...

Validator for type strings?

Anyone know if there is already a validator for "type" strings? I want to make sure that the type attributes in my custom config are one of the following: type="TopNamespace.SubNameSpace.ContainingClass, MyAssembly" type="TopNamespace.SubNameSpace.ContainingClass, MyAssembly, Version=1.3.0.0, Culture=neutral, PublicKeyToken=b17a5c5619...

ASP.Net Validation

I want to validate the value a user enters in a text box, so that it only enters float numbers. I'm not interested in range. How can I do this, considering also culture localization information (e.g. "." or "," as separators)? ...

Custom TextBox with built-in Validator: server side validation not firing

I have a class that looks like this: public class TextField : TextBox { public bool Required { get; set; } RequiredFieldValidator _validator; protected override void CreateChildControls() { base.CreateChildControls(); _validator = new RequiredFieldValidator(); _validator.ControlToValidate = this.ID; ...

ASP.NET define input validators programmatically depending on configuration

I'm writing an ASP.NET 3.5 web application. There is a rather complex input form (30 input controls - TextBoxes, Dropdownlists, ...). Now, different clients use the same form in their customized application and there are different mandatory fields for some clients. Now, I'd like to programmatically create/activate certain validators de...

ASP.NET: Custom client-side validator for "one of two fields must be filled"?

Can you tell me if there anybody has implemented a custom validator for checking that one of two (or N) input fields are filled? "Insert phone number or email address" I'm using ASP.NET (Ajax) 3.5, the ajaxToolkit:ValidatorCalloutExtender (and jQuery if it's necessary). ...

How do i get a field value inside a custom Struts Validator, when the field's type is FormFile?

I have a form field of type org.apache.struts.upload.FormFile. I would like to validate the field's size with a custom struts validator. To get the field's value, i have used for a text field the next code: String value = ValidatorUtils.getValueAsString(bean,field.getProperty()); However, how do i get the value for a FormFile field? ...

RADGrid and ValidatorCalloutExtender

Hi there - I'm using a RADGrid inside a WebUserControl and am having some issues with the Validator Callout Extender. The Grid uses edit in place and I have setup an EditItemTemplate for one of the fields that contains a drop down list which in turn has a required field validator attached to it. The validator works as expected, howev...

How to create custom validator in Asp.net using ActiveRecord

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

Disable ASP.NET validators with JavaScript

Does anyone know how to disable an ASP.NET validator using JavaScript? I'm using javascript style.display = 'none' to disable parts of a web page. However these disabled parts have asp.net validators that are still firing and I need to disable then without doing a round trip to the server. Thanks. ...

ASP.NET - Disabling validators in a gridview using javascript

Further to my question on disabling validators using javascript - http://stackoverflow.com/questions/400346/disable-asp-net-validators-with-javascript ... Does anyone know how to pass through a gridview in javascript to dynamically disable the validators on each row. I now understand that I'll need to use ValidatorEnable(validatorContro...

ASP.NET - how to stop unrequired server validation

I have used ValidatorEnable to disable a RequiredFieldValidator in javascript. However on postback the control being validated by the validator is still validated ... even though I disabled the validator on the client. I understand why this is happening since I've only disabled the client validation ... however is there a nice way to de...