validation

Multiattribute custom validtors

I was looking at this article on custom validators in aps.net mvc 2 and I was wondering how I might go about creating a more complex validation which worked on multiple fields at once. Say something like if(fieldA > 7 and fieldB < 15) The attribute method of creating validators doesn't seem like it would work for that. ...

CrossPagePostback and Server.Validate errors

I'm working with CrossPagePostback using PostBackURL and I'm running into sporadic errors revolving around PrevousPage.IsValid. The source (source.aspx) has a LinkButton with an OnCommand event, a PostBackURL of "target.aspx" and CausesValidation="true". The target (target.aspx) page checks for PreviousPage != null in Page_Load and then...

using CKEditor with jQuery validation plugin not working

I'm using CKeditor and the jQuery validation plugin from basistance. My textarea (with the CKEditor on it) is being validated by jQuery, but that only works after the second click on my submit button. In short: the first time I submit the form when data is entered in the CKEditor, it says "field is empty". The second time it says it's o...

Experience with ValidationAspects for C# and WPF

I've downloaded the examples for the ValidationAspects library from CodePlex.com, but the samples flat out don't work. Nothing gets updated and changed to indicate errors on the forms in the samples. Has anybody had experience with the library ? Am I just missing something simple that I need to add / remove / reconfigure ? ...

XSD and Date Range Validation

How would I write the XSD to validate the StartDate element and EndDate element are within the Quarter element and Year element? Thanks. <OrganizationName>Chevron</OrganizationName> <Quarter>4</Quarter> <Year>2010</Year> <Fuel> <FuelPathwayCode>CARBOBCB001</FuelPathwayCode> <PhysicalPathwayCode>PP001</PhysicalPathwayCode> <transacti...

UITextField Validation visual feedback

i have a uiTextField that i am validating input on, when i have invalid input what are some appropriate ways to show that the input is invalid? is there any built in mechanism for showing invalid input states? ...

Increasing performance on data validation

The following example is clearly fictional but it resumes how validation is done on a code base I'm working with. TypeA has two methods, with the following signatures: public void FirstMethod(TypeB param) public ValidationResult TryFirstMethod(TypeB param) When FirstMethod is called it needs to perform validation on the parameter. He...

jQuery Validation Plugin: How to test for valid and only test for valid

Hello all, So I'm trying to find a way to have the jQuery validation plugin simply return false when the form is invalid, and not show the error messages or do anything else. But this is proving more difficult than it should be. I'm setting up the validation as such: var validator = $journalForm.validate({ rules: { EntryDate: { requ...

jQuery validation plugin + CKEditor - validate when typing

Hi! I'm using CKEditor on a textarea and the jQuery validation plugin (http://bassistance.de/jquery-plugins/jquery-plugin-validation/) With the jQuery plugin it's possible to mark a field as empty or required. When a field e.g. "product name" is empty the field will be marked as invalid when submitting the form. But, while typing in a...

Send data to XML via AJAX jquery

I have a small script, where on change I am getting the ID of a select, I then want to take that ID and send it via "data:" through the jQuery AJAX call. I am using XML for my data and I am sending this ID for it only returns results with that specific ID? I understand how to do this with PHP, but never worked with XML and jQuery befor...

Difference in regex email validation between jQuery plugin and org.springmodules.validation

Greetings! I have a Spring app and a form getting validated on the back and front ends. On the back end I'm using annotation based validation for the EMAIL field with help from org.springmodules.validation. So far so good. On the front end I decided to use the jQuery Form Validation plugin and discovered that front and back validation a...

Validating a domain object for persistence

In the system I'm currently working on, I'm following SRP (I think!) by separating the validation of domain business rules vs persistence constraints. Let's employ the overused customer example. Say a customer must have a valid zip code, street address and name to satisfy the system's business rules. Let's further say that the customer...

ASP.Net MVC 2.0 Client Validation with Castle Validators

Hi there, Im trying to implement a client and server validation for my webapplication using castle valitors.Has anyone got any examples of how to use Castle Validators with ASP.net mvc v2 Client validation. ...

Choose the best Client/Server Validation Framework for MVC

Hi there, Im trying to choose the best server/client validation framework to use with my MVC application. I would like to know what is the best validation framework to use with MVC to do server/client validation. My options are: Castle validator Microsoft Data Annotations nHibernate Validator ...

Check String whether it contains only Latin characters?

Greetings, I am developing GWT application where user can enter his details in Japanese. But the 'userid' and 'password' should only contain English characters(Latin Alphabet). How to validate Strings for this? ...

Trouble validating <ul> dropdown menu

I am having trouble validating my html, my menus are triggering the following error: "document type does not allow element "li" here; missing one of "ul", "ol" start-tag" link to validator link to site My code is as follows, the menus are drop-down menus <ul> <li> <a href='services' class='inactive'>Services</a> ...

Regex to allow text, some special characters and keep below a specified length

Hi all, I'm trying to create a validation expression that checks the length of an input and allows text and punctuation marks (e.g. , ? ; : ! " £ $ % ) What I have come up with so far is "^\s*(\w\s*){1,2046}\s*$" but this won't allow any punctuation marks. To be honest I'm pretty sketchy in this area so any help would be greatly appre...

Is div inside list allowed?

I know that DIV inside LI isn't allowed, but I've seen it lately on many "big" websites like: Smashing Magazine, Web Designer Wall... etc. I try to validate sites, and they have errors, but nothing about div's in LI?! So can i use it inside LI, and I need it to be valid? Thanks ...

WPF DataGrid Validation error not being caught

Hello I am trying to use exception validation on a cell in a DataGrid together with a style on the DataGridTextColumn's EditingElementStyle to set a tooltip with the content of the error. The error occurs but is not being caught or displayed within WPF. The code and exception are shown below. Can someone tell me what I need to fix this...

ASP.NET File upload - Validation

In our application , we are using asp.net FileUpload control to upload files. Requirement is , user should be able to upload only ".doc, .xls , .pdf" files. System should not allow him to upload other files. To achieve this we are validating the extension of the uploaded file. If it is not valid then throwing error message.. this wor...