validation

WCF Parameter Validation with Interceptor

I have a WCF service with operations that all require MyServiceRequest parameter (or derived type) and returns MyServiceResponse (or dervived type), i.e.: [OperationContract] MySeviceResponse FindAppointments(FindAppointmentRequest request); [OperationContract] MyServiceResponse MakeAnAppointment(MakeAnAppointmentReques...

Custom ASP.NET MVC validation summary for address fields

I'm trying to figure out the best way to validate a one page checkout. It contains : ship address billing address etc. the Address class obvious contains First Name, Last Name, Street1, Street2, City, State, Zip, Phone etc. Lets say the user clicks 'OK' before entering anything - then you end up with a dozen or more validation error...

How do you style the errored input fields with the jQuery validation plugin?

I'm using the jQuery validation plugin, and I want to add a class to the input fields that doesn't validate, i.e. add a red border. Anyone know how to do this? ...

PHP Doctrine Validation

Hi, I'm using doctrine and trying to validate some models. I have the following in my YAML schema: User: package: User columns: username: type: string notnull: true notblank: true minlength: 4 password: type: string notnull: true If I create a new user, it always validates, regardless o...

jQuery validation - only show one error message

Is there a way to only show the latest error-message thrown, when using the validation-plugin for jQuery? ...

How do I handle server side validation error if I have a form running inside a jQuery UI dialog?

I have the following code in my controller after the user posts the form but if the validation fails (_applicationValidator.Validate), I normally reload the "Edit" view but in this case I want to keep the dialog open and simply show these errors inside the dialog. Controller Code: [AcceptVerbs(HttpVerbs.Post)] public ActionResult...

End date must be after start date (jquery for noobs)

I'm having a heck of a time wrapping my head around JQuery syntax (probably because my javascript isn't that solid to begin with). Here's my problem. I'm using datepicker on two input boxes (#ev_start and #ev_end) #ev_end must occur after #ev_start. HTML Event Start <input type='text' name='ev_start' id='ev_start'/> Event End <inpu...

ASP.NET MVC Simple validation of my form fails

Hi, I have a simple for with at text field where the user enters the address of a RSS feed. I wont act if the field is blank, this is my markup: <%=Html.ValidationSummary() %> <table> <tr> <td> Feed Url: </td> <td> <%=Html.TextBox("url", null, new {@style="w...

Rails validate_existence_of plugin

I'm reading the book Learning Rails by O'Reilly and it recommends using the validate_existence_of plugin. When I run: ruby script/plugin install http: //svn.hasmanythrough.com/public/plugins/validates_existence/ it says it's already installed, but when I use it, I get a message saying: NoMethodError in AwardsController#index undefine...

What's the pattern for design-time validation in Workflow Foundation 4.0?

I'm unclear about when and how I should be doing validation in my custom activities/custom activity factories/custom designers in WF 4.0. The only place within my activity that seems to provide validation error support is within the CacheMetadata method (I believe this is called multiple times during the design process). Is this wher...

String Dot String (Mail without Domain) RegEx

Hi mates, Really got stuck on this simple regex. Need it to validate a string, that will be a mail without the "@domain.xxx". It must accomplish the following rules: there must be a string (only letters) starting. there must be a string (only letters) ending. this two strings must be separated by a dot. the complete string mustn't co...

Cleanup PHP String from Web Form Input

I have a web-form that is getting customer information. The form is processed using PHP 5.1.6 so using the filter_input() will not work. The form has a text area along with some other standard fields. I am getting lots of strange formatting codes that are being stored in our MySQL database. How can I filter these results where they lo...

Batch UTF-8 Validation Tool?

Anyone know an app/service/method that I could use to validate a bunch of XML files for UTF-8? Basically I have a ton of XML files that are suppose to be UTF-8 and some of them happen to contain some bogus characters causing them not to render right in the content viewer. I know I can check one at a time with methods found in this answ...

Overriding dijit validator function and using regExp attribute

I'm new to dojo and could really use some help with the following 2 field validation examples. In the following example of a dijit.form.ValidationTextBox field specifying the validator property seems to override the use of the regExp. (ie the field no longer adheres to the regExp rule). How to I make it do both? <input dojoType="dijit....

Advert Click Validation

I am working on a sensible advert exchange system. Most of the ones out there have crappy interfaces over crappy codes. I want to do somthing different. What are the things I need to consider when validating clicks and impressions to ensure the integrity of the system. Thanks in advance. :) ...

Data validation techniques - Interactive, Preflight Checklist, etc.

I am working on a form filling program and I'm looking for suggestions on implementing data validation. I'm considering a two-phase approach: Interactive - after user enters data and attempts to move to the next field, flag invalid data with something non-obtrusive, like a balloon message but let the user continue on. Preflight Checkl...

Prefix in xVal client side causing ModelBinder problems

Over the last 24 hours, I've become greatly enamored of xVal. I introduced it into my personal web site, and it works like a champ--I can't believe how easy it was to get it going. I'm using ASP.Net MVC, xVal 1.0, and the DataAnnotations validators. Now trying to put this same code into a work application, I'm seeing different behavio...

How to validate a model's date attribute against a specific range (evaluated at run time)

I have several models with a date attribute and for each model I'd like to validate these dates against a given range. A basic example would be: validates_inclusion_of :dated_on, :in => Date.new(2000,1,1)..Date(2020,1,1) Ideally I'd like to evaluate the date range at runtime, using a similar approach as named_scope uses, e.g: valid...

Validating HTML from the command line

I'm a web developer who is increasingly using Vim to code web sites. Are there any HTML validation utilities (or techniques) out there that will take whatever file I'm working on and validate against its DOCTYPE without leaving the shell? T ...

WPF IDataErrorInfo multiple field validation

What is a good way to integrate multiple field validation with IDataErrorInfo? Let say that I have a dialog with 3 textboxes for ftp information URL Username Password I have put the Required attribute on the fields (assume a normal TextBox for the password). I validate the ftp connection when the user press "OK". At the moment I sh...