form-validation

Suspend file validation on Zend Framework

Hi, Currently on my application I have a form where I ask the user to upload an image file to be used as a logo. I want to allow the user to reset that to nothing by supplying no file (by just pressing the upload button from the browser). In this scenario the only thing left is to suspend file validation when no file is included. Curren...

Advanced Form Validation in JavaScript

I'm already familiar with how to use onSubmit to evaluate form content against RegEx to ensure it meets static parameters for acceptable content. What I'm wondering is if there is a way to further provide validation against a MySQL database, such as if you want to make sure an e-mail address hasn't been used yet before submitting a form...

How can I validate a "does not match" type using CodeIgniter's Form Validation class?

I want to ensure that a certain text field does not contain a specific value. Is there any way for me to do this using CI's Form Validation class or do I have to write my own extension for it? ...

Convert input to integer before save in rails

Hello, i have a set of select inputs representing a users birthday: birthyear, birthmonth and birthday. And i want to validate birthyear like this: validates_inclusion_of :birthyear, :in => Date.today.year-50..Date.today.year-12 So the user can be at least 12 years but at most 50 years when they are registering. But my problem is th...

How can i make a callback to accordion after form validation, to show errors

I have a very long form, which is divided into fieldsets which in turn are being shown or hidden, using the harmonica from jQuery UI. I am using form validation from jQuery as well, all newest versions. After submission and validation the user is redirected to the first erroneous field by $('myForm').validate(); But the containing harmon...

ValidateRequest = False but in action it's still True and ignored that?

hi guy's, i want disable RequestValidation on particular view in ASP.NET MVC 2.0 RTM. so i added some necessary to view Page directive section as below: <%@ Page ValidateRequest="false" Language="C#" MasterPageFile="Path" Inherits="System.Web.Mvc.ViewPage<Path>" %> but RequestValidation isn't Disabled! i also added RequestValidation A...

Name validation using jquery validation framework

I want to add a custom function using jquery validation framework, to help validating names (first name and last name) inside a form. I understand I could just eliminate numbers... but wondering if there is a 'best practice' way using jquery validation framework, somebody could suggest me...? Thanks ...

Hiding and showing fields still validates hidden fields with ASP.NET MVC 2 Client Side Validation

I've got a form as part of an e-commerce checkout process which has a section for billing address which allows the user to use their delivery address or to fill in an address in the form. If the user selects to use their delivery address I don't show the address fields. I've added validation for all fields then on the server side I che...

Howto see if form fields are identical in Zend framework

Hi there, In Zend Framework (1.10) i want to check if two input fields are identical I have the following code in my form: $this->addElement('password', 'password', array( 'label' => 'Wachtwoord:', 'required' => true ) ); $this->addElement('password', 'verifypassword', array( 'label' => 'Bevest...

minLength data validation is not working with Auth component for CakePHP

Let's say I have a user registration and I'm using the Auth component (/user/register is allowed of course). The problem is if I need to set a minLength validation rule in the model, it doesn't work since the Auth component hashes the password therefore it's always more than my minlength password and it passes even if it's blank. How d...

Form Validation - IF field is blank THEN automatically selection option

Hi I need help to automatically select an option to submit with a form: When the 'form-email' field is blank i want it to select 'option 1' and, When the field is not blank i want it to select 'option 2'. Here's my form code <form method="post" onsubmit="return validate-category(this)" action="tdomf-form-post.php" id='tdomf_form1' na...

Using jQuery for client side validation in MVC2 RTM

Scott Gu's tutorial on Model validation gets us all set up with the MS client side validation using the following scripts: <script src="../../Scripts/jquery.validate.min.js" type="text/javascript"></script> <script src="../../Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script> However I've seen various posts allowing u...

Validating made up fields in CakePHP?

Here's my scenario: I'm creating a password change page. the real field that holds the password is User.password On the password create page, I used 3 made up fields: $form->input('User.old_passwd'); $form->input('User.new_passwd'); $form->input('User.confirm_new_passwd'); How do I validate them with the rules: old password must matc...

form validation message inside textbox

How to make validation something like this screen shot..! is there any jquery plugin ,will do the validation... my screebshot ...

Bypass django form validation on new form instance

Hello! I have a situation where we are trying to autofill some form data on the second page of a signup and I was wondering if there's a way to bypass the entire form validation when we pass in only a couple of fields? so we have something like form = NewForm(request.POST) Where request.POST only contains some of the fields in NewFor...

Using label tags in a validation summary error list?

I was thinking about making use of <label> tags in my validation error summary on a failed form submit and I can't figure out if it is going to get me in trouble down the line. Can anyone think of a good reason to avoid this approach? Usability, functionality, design, or other issues are all helpful. I really like the idea of clicking a...

Problem with $.get while submitting form

I'm trying to verify that an Account Name is not already in use once a user fills out a form. The code looks like: $("#add_account").submit( function () { $.get( "'.url::site("ajax/check_account_name").'", {account_name: "t"}, function(data){ alert( data ); ...

how to do server side form validation for dynamic inputs with Django

Hi, all. I am using django.forms.Form to validate form data in a survey applications. In a survey-creating form, a user can submit multiple questions that belong to the survey being created. Names for the question inputs are in the form of 'question_seq' , where seq is maintained using Javascript. Back in the server side, my code doe...

JSF how to temporary disable validators to save draft

I have a pretty complex form with lots of inputs and validators. For the user it takes pretty long time (even over an hour) to complete that, so they would like to be able to save the draft data, even if it violates rules like mandatory fields being not typed in. I believe this problem is common to many web applications, but can't find...

Best free Windows Forms validator control

What is the best free Windows Forms validator control. I want to use it in a free (and maybe open-source) project. I know these: ValidationProvider Control not working in VS2010 DXValidationProvider works only for devexpress controls. Supervalidator from DevComponents meets my needs but it isn't free. here is a picture of it: ...