validation

How to display messages in invalidHandler in JQuery validator

I'm trying to use the JQuery validator on a form and am trying to figure out to get the messages of the errors in the invalidHandler option (or if there's somewhere else, do tell). When a user clicks the submit button, whatever the first error is, I want to display an alert box with the message of the error. I don't want the error to be...

Video file validation in django

First we upload the video file and try to convert in .flv video file if convert the video file in .flv file then no problem and if not able to convert in .flv file then show messages like this video format is not supported..bcz some video file not converted in .flv like(swf) ...

regex - date format OR not specified/empty

Hi, I have a regex problem that I need some advice on. I am using a jquery plugin that validates input fields on a JSP. I am using the date validation. It all works fine but this field is not required and is not marked as required. When the user hits submit it shows a warning on the date input field since the empty string does not m...

Rails: validation between columns

Assume, we have a model, let's call it Articles. There, we have two columns, min and max. The rule is: min can't be greater or equal to max. How do you resolve this custom type of validation? Any ideas? Going further, let's assume that we have columns character and made_of. Task is to create a validation which is gonna help to avoid a s...

C# Regex Compatibility Issue (.NET 3.5 vs .Net 2.0)

I have the following regex expression on a dev machine that is running .NET 3.5 and it works as designed. However when it is deployed to our test environment (which is running .NET 2.0) it doesn't work right and always seems to return false. Does anyone know what the culprit may be? Thanks using System.Text.RegularExpressions; prote...

Good methods for human-readable & human-maintained databases

So this is the scenario: You have a bunch of data that needs to end up in SQL. It needs to entered by hand. It is not an "enter once and you're done" scenario: it will need to be modified and expanded by humans in an ongoing iterative way. Comments will be associated with entries. It is also useful for data entry people to be able to ...

Flash[:notice] doesn't show properly for automatic validation

Hello, I'm using Rails 2.3.4/Ruby 1.9.1 for my application. In the view I have this to show error messages: <%= content_tag('div', flash[:notice], :class => 'flash notice') if flash[:notice] %> it works fine if I assign it manually from the controller such as: flash[:notice] = "User Name can only contain letters, number - or _" Bu...

ASP.Net validation controls behaviour

Hi Asp.net validation controls generates client-side javascript that validates controls. I decided to have a look into the ASP.NET validation JavaScript and I can see there is a function that hooks into the onchange events for controls to make sure the validation script runs when a values is changed. My question: Is there a way to d...

Silverlight CustomValidation on a class

If I add CustomValidation on a class or a class property, how do I trigger that from code? Thanks, Mark ...

Regex for url validation (unterminated parentheticals error)

I have the following expression to validate a URL but it gives me a syntax error on the browser. I am no expert in regex expressions so I am not sure what I am looking for. I would also like it to test for http:// and https:// urls. "url":{ "regex":"/^http\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(/\S*)?$/", "alertText":"URL must start...

How do ruby on rails multi parameter attributes *really* work (datetime_select)

I believe that datetime_select is black magic. What I'm really trying to figure out is the whole 1i,2i,3i,4i... multiple parameters stuff. Specifically how is it handled in the back end (activerecord, something else?). What's with the 'i' after the order-number? Is it a type-specifier? If so what are other types that are available? I...

Outlook Automation from c# - suppressing validation messages.

Hello All, I am invoking a new meeting window from my outlook addin and allowing user to create new meeting and send. When user does not enter subject or location, i am validating (with yes/no buttons to continue) them and when i call .send() method on outlook interop object it is also validating and popping up the message. So, its doub...

Windows Vista users verification

hi! I want to verify that given username/password pair is a valid windows vista account using c#. ...

xsd - validating values from external dictionary file

I would like to define a schema for a document like: ... <car> <make>ford</make> <model>mondeo</model> </car> ... the problem is that I would like to constraint possible values (so ford/mondeo or audi/a4 would be valid values for make/model, but audi/mondeo would not) from external data dictionary. In case when new car models nee...

CustomValidator time c#.net

Hello all, I have using c#.net. I have a textbox which should contain a time. It needs to be in 24 hour format. I would like to use a CustomValidator but can’t find anything on the net. Thanks in advance for any help Clare ...

wpf error template - red box still visible on collapse of an expander

Hi, I'm doing some validation on the DataSource of TextBox that's within an Expander and have found that once a validation error has been triggered, if I collapse the Expander, the red box stays where the TextBox would have been. <Expander Header="Blah Blah Blah"> <TextBox Name="TextBox" Validation.ErrorTemplate="{DynamicR...

Will ValidationHandler use the DataAnnotation Attributes?

Will the ValidationHandler in the Policy Injection Application Blocks work with DataAnnotation Attributes(for validatation) or do I need to decorate my models with the Attributes from the Validation Blocks? ...

Which asp.net validation control should I use?

Hello all, I have two textboxes, each contain a time (textboxA / textboxB). I need to be able to validate that textboxA is before textboxB. For exmaple: textboxA = 10:30 / textboxB = 12:30 VALIDATION = true textboxA = 10:30 / textboxB = 10:00 VALIDATION = false I would prefer to do the checks using server-side controls. Thanks...

Dojo Composite/Group validation

Hi, Given 2 text fields that (e.g. House Number, and House Name) on a form, and in order to be valid the user must enter a number or name in the appropriate field before the 'group' of 2 fields is considered valid. A user could enter just a house number, or a house name, but entering a value in either field marks both of them valid. I...

Creating Custom RegExpressions for MX:Validator - Explanation.

Hello guys. I'm been trying to validate Data in a Flex TextFiled, and I've encountered some Validator's include in the Flex Framework. But lets say i want to build a custom Validator with my own RegExpression. Can somebody do me a simple example. Appreciated. ...