validation

Performing both client side and server side validation using jQuery and CodeIgniter

What is the right way of doing both client side and server side validation using jQuery and CodeIgniter? I am using the jQuery form plugin for form submit. I would like to use jQuery validation plugin (http://docs.jquery.com/Plugins/Validation) for client side validation and CodeIgniter form validation on the server side. However the two...

JSF required field validation-need help

Hi, I am Rashmi.I have two forms in a single JSP page which are developed using JSF.Each form has one required field input and a submit button.On click of any of the button from any form,both forms should get validated and display required message.Please need help.......... sample code: <body> <f:view> <h:form id="form1"> <h:...

WPF Datagrid Cell with Validation Error Style

Hi, I am trying to change the default style of a DataGridCell (within a WPF Toolkit DataGrid) when there is a validation error. The default is a red border. How can I put my own template? Thanks. ...

change validate message in data annotation

my object has field with data type int. when i put in html form in this textbox letter not number the validator say- The field must be a number. how can i change this messages like this [Required(ErrorMessage = "Введите название")] [DisplayName("Название")] public int age { get; set; } ...

jQuery Validation Plugin: Validating Checkboxes with Different Names

I have a set of 4 checkboxes, all with different names, and require that at least 1 is checked. I have set the class on all of them to 'require-one'. <html> <head> <script src="scripts/lib/jquery.js" type="text/javascript"></script> <script src="scripts/jquery.validate.js" type="text/javascript"></script> <script language="JavaScr...

Attribute based validation in ASP.NET Web Forms using MVC libraries?

Is there a way in ASP.NET Webforms to accommodate attribute based validation. If so any urls where this has been demonstrated. I am not looking for open source projects. Just as you can use MVC Routing in Web Forms, can the validation framework be used? ...

WPF DataGrid.RowValidationRules : allow a row with errors to be commited

I'm using DataGrid.RowValidationRules to display error messages in Row Details when the row is not valid. <c:DataGrid.RowValidationRules> <c:RowDataInfoValidationRule ValidationStep="UpdatedValue" /> </c:DataGridx.RowValidationRules> The model implements IDataErrorInfo and I'm using this ValidationRule: public class RowDataInfoV...

Validate XML instance document against WSDL

Hi, I can easily validate a XML document against a XML Schema, eg. with XMLSpy or programmatically. Is it possible to do this with a WSDL file? It does not seem possible with XMLSpy or any other XML tool I know. For me the only possibility right now is to do it programmatically, eg. by generating Java code from the WSDL and starting a ...

How do I repopulate the view model in ASP.NET MVC 2 after a validation error?

I'm using ASP.NET MVC 2 and here's the issue. My View Model looks something like this. It includes some fields which are edited by the user and others which are used for display purposes. Here's a simple version public class MyModel { public decimal Price { get; set; } // for view purpose only [Required(ErrorMessage="Name Req...

Date validation in PHP

What would the regex expression that would go into preg_split function to validate date in the format of 7-Mar-10 or how can I validate a date of format 7-Mar-10 in PHP Thanks. ...

Why should I use PropertyProxyValidator? ASP.NET

I understand thatthe PropertyProxyValidator integrates with the ASP.NET UI. But, it cannot do client side validation. How would it be any different from throwing in a label in the UI and populating the errors on the server side? Also, If I am using Validation Application Block, what approaches do you suggest for client side validation i...

How to validate two properties with ASP.NET MVC 2

Hey folks :-) I'm just getting started with ASP.NET MVC 2, and playing around with Validation. Let's say I have 2 properties: Password1 Password2 And I want to require that they are both filled in, and require that both are the same before the model is valid. I have a simple class called "NewUser". How would I implement that? I'v...

How to Create A Document Type Definition

Hi Guys I've been creating a lot of my own custom attributes in my XHTML documents lately, and am aware that because they are custom attributes, they won't validate against the W3C standard. Isn't it true that I can specify my own DTD to make it validate? If so, can anyone tell me what's involved in doing this in an ASP.NET MVC app? T...

pass Validation error to UI element in WPF?

I am using IDataErrorInfo to validate my data in a form in WPF. I have the validation implemented in my presenter. The actual validation is happening, but the XAML that's supposed to update the UI and set the style isn't happening. Here it is: <Style x:Key="textBoxInError" TargetType="{x:Type TextBox}"> <Style.Triggers>...

and or operator in validates_presence_of of a Ruby on Rails model

I have an entry.rb model and I'm trying to make a semi-complicated validation. I want it to require one or more of the following fields: phone, phone2, mobile, fax, email or website. How would you write the intended code? Would something like this work? validates_presence_of :phone and or :phone2 and or :mobile and or :fax and or :email...

Kohana 3: What are Validate::label and Validate::labels for?

What are the Validate::label and Validate::labels functions for in Kohana 3? What are they meant to be used for? ...

How to validate presence of an uploaded file in rails?

I'm playing around creating a rails file uploader and have struck a problem that should have an obvious solution. How do I check that a file has been selected in my form and uploaded? Here is my new.html.erb view <h2>Upload File</h2> <% form_for(@upload_file, :url => {:action => 'save'}, :html => {:multipart => true}) do |f| %> <%=...

Regex-expression with danish characters

I'm currently trying to wrap my head around regex, I have a validation snippet that tests an input box against a regex-expression: $.validator.addMethod("customerName", function(value, element){ return (/^[a-zA-Z]*$/).test(value); }, "Some text"); That works well, but when I try to add a space and some special danish characters, it do...

asp.net regular expression not working as expected

Hi, I have a textbox and a regular expression validator applied to it. I want to make sure that the only allowed string inputted into the textbox are "Anything Entered" or "Something Else" or "Another String" otherwise I want an error to be displayed. This is the regular expression I have so far: ValidationExpression="(^Anything Enter...

How to check for whitespaces in CSV file ?

Currently I am using ctype_alnum to check for alphanumeric type in csv file. But one of my data has white spaces between them and so ctype_alnum gives me false. Example: ctype_alnum("Here is 23"); So my question is how can I check for white spaces in string in php ? ...