validation

Date/Time Range Validator for ASP.Net

It looks like the standard asp.net 2 RangeValidator control doesn't allow times. e.g. 01/01/2008 12:00 is not accepted in my range, even though it should be valid. If I remove the time it works as expected. Is there a validator out there that allows for date/time format? Update We don't have Ajax extensions. Ideally, would like a pree...

Automatically Duplicating Business Logic on Web Client

Last week I implemented a date validation in our front end, a combination of ASP.NET and heavily dependent on lots of JavaScript code to avoid server round-trips until a form is actually saved. I felt it clumsy that this rule check is not done on the server, but our current architecture and performance requirements prevent this. It's o...

What is the best field validation plugin for Prototype?

Not wanting to re-invent the wheel or anything, I was wondering if there's a plugin out there a field or form validation plugin that works with Prototype that you can recommend from your own experience and why? ...

Django Forms, Display Error on ModelMultipleChoiceField

I'm having an issue getting validation error messages to display for a particular field in a Django form, where the field in question is a ModelMultipleChoiceField. In the clean(self) method for the Form, I try to add the error message to the field like so: msg = 'error' self._errors['field_name'] = ErrorList([msg]) raise forms.Validat...

ASP.NET CompareValidator issue

Hi, I've got a web form with Password and Confirm Password text boxes. I've got a RegularExpressionValidator attached to the first one and CompareValidator to the second one. Now the problem is when i have something in the Password field and nothing in Confirm Password field it does not display an error that fields don't match. As soon ...

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)? ...

How to disable clientValidationFunction dinamicly on a validator that is inside an update panel

When reaching my page from a specific button on another page, I dont want validators to work. I have disabled the validator on Page_load , but the client function sometimes still work, how do I make sure it will stay down. ...

Escaping double quotes in a value for a sticky form in PHP

I'm having a little bit of trouble making a sticky form that will remember what is entered in it on form submission if the value has double quotes. The problem is that the HTML is supposed to read something like: <input type="text" name="something" value="Whatever value you entered" /> However, if the phrase: "How do I do this?" is ty...

ASP.NET Validation

Hi, I am working on a form, which I would like to validation features like This. Should this all be done on clientside? or server side? I am aware of using some of MS ajax controld, however, at what point do I display the message at the top? I hope I explained myself. ...

Hidden Input Field causes potentially dangerous Request.Form value error

In my ASP.NET 1.1 application, I am compressing and replacing the hidden Viewstate variable with an alternate compressed value, stored in a hidden field called __VSTATE. This works well but on a few occasions, submitting a page causes the common "potentially dangerous Request.Form value ..." error. I examined the __VSTATE value and noth...

Javascript: how to validate dates in format MM-DD-YYYY?

I saw a potential answer here but that was for YYYY-MM-DD: http://paulschreiber.com/blog/2007/03/02/javascript-date-validation/ I modified the code code above for MM-DD-YYYY like so but I still can't get it to work: String.prototype.isValidDate = function() { var IsoDateRe = new RegExp("^([0-9]{2})-([0-9]{2})-([0-9]{4})$"); ...

Label Validating Event Not Firing

I wish to use the Validating event on a label in VB.Net (Visual Studio 2005, .Net Runtime 2.0). I have two text boxes side by side. These are for a %/% split allocation, such as 80/20, 50/50, etc. So, I have validation on each box to ensure that their values are >= 0 and <= 100. It is my desire to have the label off to the left of the t...

Is there pseudocode for UK address or phone number validation?

Do you have pseudocode for field validation of the following items in the UK? I am from the USA, so I only know the ones in the USA right now. Address Line 1 Phone Number Mobile Number (in case they have a special rule for this, which they might not) Post Code ...

Validation of radio button group using jQuery validation plugin

How to perform validation for a radio button group (one radio button should be selected) using jQuery validation plugin? ...

How do I cancel a server control event in the client side?

hello, I have an asp.net image button and I want to cancel the click event incase he fails the client side validation... how do I do that? ...

How can I disable a validation and callbacks in a rails STI derived model?

Given a model class BaseModel < ActiveRecord::Base validates_presence_of :parent_id before_save :frobnicate_widgets end and a derived model (the underlying database table has a type field - this is simple rails STI) class DerivedModel < BaseModel end DerivedModel will in good OO fashion inherit all the behaviour from BaseModel,...

How can I validate within an InfoPath form whether a user exists within a SharePoint Portal?

I am creating a form within InfoPath which is to be integrated into a SharePoint 2007 Portal. Within this form there will be a textfield into which a user can enter the Name of a Person. How can I validate whether this Person exists or not? Instead of validating the user, is there a way to fill a dropdown List with all usernames of th...

JQuery validate: How to add a rule for regular expression validation?

I am new to JQuery and am using the JQuery validation plugin. Great stuff! I want to migrate my existing ASP.NET solution to use JQuery instead of the ASP.NET validators. I am missing a replacement for the regular expression validator. I want to be able to do something like this: $("Textbox").rules("add", { regularExpression: "^[a-zA-Z...

What do you suspect when ASP.NET ignores a CustomValidator?

This is as much a code maintenance issue as a code issue, but I have a WebForm that no longer checks it CustomValidator. It worked when I last touched the code over a year ago, but it no longer works now that the user has requested some changes ... The WebForm contains a data-bound drop down with a default " - All -" item with String.Em...

Multi-Platform SQL Query Validator

Does anyone know of a tool that can verify that a given SQL statement is valid across different databases (oracle, db2, mssql)? ...