validation

MySQL VARCHAR like Data type with MIN and MAX character lengths

Looking for a data type that is similar to VARCHAR as to the values I would like, but is there a way to have a MIN/MAX character length? VARCHAR(6,10) This would have a minimum of 6 characters and a maximum of 10 characters. ...

Configure Hibernate validation for bean

Hi. I need to perform validation based on SQL query result. Query is defined as annotation - as @NamedQuery in my entity bean. According to Hibernate documentation(doc), there is possibility to validate bean on following operations: pre-update pre-insert pre-delete looks like: <hibernate-configuration> <session-factory> ....

[Rails] Accessing error_messages on form_tag

I have built a custom form for creating a joining model on a has_many :through relationship. The models look roughly like this: class Team has_many :team_members has_many :members, :through => :team_members end class Member has_many :team_members has_many :teams, :through => :team_members end class TeamMember belongs_to :tea...

jQuery Validation Plugin: Packer undefined error?

I'm using the jQuery validation plugin from bassistance.de. It works fine. From <head>: <script type="text/javascript" src="/static/JQuery.js"></script> <script type="text/javascript" src="/static/js-lib/jquery.validate.pack.js"></script> <script type="text/javascript" src="/static/js-lib/jquery.validate.additional-methods.js"></script...

Data validate tools (ETL tools) for SQL server

I have some data in Excel and need to import into database. Is there any tool that can validate and maybe clean the data? Does Red Gate have such tool? The input will be Excel. Given table constraints, eg. CHECK, UNIQUE KEY, datetime format, NOT NULL. Desire output should be as least shows which lines are having problems, and then fix s...

How to validate the email and phone numbers in Iphone sdk?

Hi Guys, I would like to validate the emails and the phone numbers in my app.but I dont have any idea to implememnt this.can any one give me suggestions how to implement this with a sample code. Anyone's help will be much appreciated. Thank You Monish ...

Validation library PHP / Javascript

Hi, could someone recommend a PHP form validation library (that works independently outside of any php framework) that apart from doing all sort of basic validation (is empty, vs regex, is email, is alphanumeric and so on) can produce javascript code (ideally to work with jquery) to validate the very same form with the very same rules c...

XML Schema and element with type string

I'm trying to create an XML Schema and I'm stuck. It seems I can't define an element with string content. What am I doing wrong? Schema: <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://ponderka.wz.cz/MusicLibrary0" targetNamespace="http://ponderka.wz.cz/MusicLibrary0"&gt; <xs:element name=...

Python library to validate Excel data

Is there any existing Python library that can validate data in Excel format? Or what kind of keyword should I use to search such an open source project? Thanks. ...

How to validate username using Javascript?

Hi, I want to know how can I validate using Javascript that if user has entered any username at the time of creating an account is already present in database and ask user to type any other username? ...

how to prevent white spaces in a regular expression regex validation

i am completely new to regular expressions and am trying to create a regular expression in flex for a validation. using a regular expression, i am going to validate that the user input does NOT contain any white-space and consists of only characters and digits... starting with digit. so far i have: expression="[A-Za-z][A-Za-z0-9]*" ...

ASP.NET MVC DropDownList Validation

Hello everybody, I have [DisplayName("Country")] public List<SelectListItem> Countries { get; set; } property in strong-type Model View class for DropDownList. When I try to check if the ModelState.IsValid on form postback it's always false & error for Countries tells "Can't convert [value] to SelectListItem" or some of a kind. I...

ASP.NET GridView - how to enable validation declaratively

It it possible to enable validation in an ASP.NET GridView purely declaratively? What I've tried: A GridView bound to an ObjectDataSource with SelectMethod and UpdateMethod defined The GridView contains some ReadOnly BoundField columns and a TemplateField whose EditTemplate contains a TextBox and a RegularExpressionValidator that only...

jQuery, insertBefore, validation, Placement of error message

I am using insertBefore under errorplacement to add validation messages, each one below each other as I want the order of the messages to go from top to bottom. I am using a hidden input at the very bottom of a parent element in order to supply an element for the insertBefore argument. Is there a way to insert from the bottom without...

Page validation not working in javascript

Hi, I have a problem regarding checking the page validation in javascript. I have a user controls in my aspx page,for example control1, control2, and control3. For each control I created a validation group, then I tried to use the code below, the problem is, it will always return a false value eventhough the page validation has been sa...

Compare Dates DataAnnotations Validation asp.net mvc

Lets say I have a StartDate and an EndDate and I wnt to check if the EndDate is not more then 3 months apart from the Start Date public class DateCompare : ValidationAttribute { public String StartDate { get; set; } public String EndDate { get; set; } //Constructor to take in the property names that are supposed to be che...

Effective Data Validation

What's an effective way to handle data validation, say, from a form submission? Originally I had a bunch of if statements that checked each value and collected invalid values in an array for later retrieval (and listing). // Store errors here $errors = array(); // Hypothetical check if a string is alphanumeric if (!preg_match('/^[a-z\...

Is there any plugin which will help me validate model on client-side?

I need to validate form on client-side and I was wondering if there is a rails plugin which will help me in this task? Maybe it will build javascript needed to validate certain model from ActiveRecord validations? ...

What's the best way to do XMLObject Validation.

Hi All, I'm doing Sprimg WS at my workplace. We run into some strange validation problems, where if a user passes "Dog" for a boolean value. It still accepts it and blows up. I would like to know what's the best way to handle this kind of problem. Requirement: Based on the SOAP request, If there are any validation errors, return the se...

jQuery Validation in ASP.NET

i have a strange situation may its a easy fix or something i may be missing but here is the question. i have a asp.net form with master page and my validation works great without any problem but the problems starts when i try to hook my click event to the server side, here is what i meant: i have a form with few fields on it and if the...