validation

Zend form and dynamic file upload

Hello there i'm trying to create a form with Zend_Form that will enable my user to upload a unlited number of files to my site, witch is done by javascript. Something like <script type="text/javascript"> $(document).ready(function(){ var image_uploade_i = 0; $('#upload_more').click(function() { image_uploade_i++; ...

Does anyone know if WordPress has builtin PHP validation functions?

Hi everyone, I am trying to build a form in WordPress and taking advantage of all its built-in functions but I am hard pressed to find any functions that do form validation. I figure those kinds of functions have to exist in WordPress but I couldn't find any because its documentation is sparse and spread out in some respects. Would anyo...

How can I prevent a page to jump to top position after failed validation?

I have a simple aspx page with a few TextBoxes and a submit button. Some fields are required and below the button is a ValidationSummary. The complete form is larger than screen height so one has to scroll down to reach the submit button. If I don't fill all required fields and click on submit validation fails as expected and the validat...

validate a textbox in vb.net

How could i validate a textbox in vb.net, so that it gives error message if i enter anything apart from alphabets ...

jQuery validation of controls

I am looking at validation of some text boxes for things like required, minlength, max length, email etc... I am able to get examples that work fine on submit button on page. I want to do this validation on a button click which will only raise a Ajax request and not submit of page. On the Internet all the samples found was with a submi...

Does XercesC contain an extensive logic of XMLSchema validation?

Tried to implement a small XML validation tool with XercesC. For some reason I cannot use existing validators right from the box - I need some preprocessing and would like to combine it with validation in a single tool. I used DOM parser and specified DOMErrorHandler. Instead of a set of errors with detailed messages like I saw from xml...

ASP.NET MVC 2 client side validation not working for Html.ValidationMessage()?

I'm trying to get a very simple client side validation example to work in ASP.NET MVC 2. I'm using data annotations to set a required property "Surname". When I use the Html.ValidationMessageFor(x => x.Surname) the correct client side validation script is written to the page. But when I use Html.ValidationMessage("Surname") the client si...

C# - Regular Expression validating Date and Hour

I receive Date and time from CSV file The received Date format is YYYYMMDD (string) (there is no ":" ,"-","/" to separate Year month and date). The received time format is HH:MM (24 Hour clock). I have to validate both so that (example) (i) 000011990 could be invalidated for date (ii) 77:90 could be invalidated for time. The que...

Why won't this PHP validate?

<?php $username = "@#*(#(*#($&*#$"; if (preg_match("/^[0-9a-z-A-Z-_@ !]*/", $username)) { echo "true"; } else { echo "false"; } ?> ...

Excess errors on model from somewhere

I have a User model, and use an acts_as_authentic (from authlogic) on it. My User model have 3 validations on username and looks as following: User < ActiveRecord::Base acts_as_authentic validates_presence_of :username validates_length_of :username, :within => 4..40 validates_uniqueness_of :username end I'm writi...

When and how to validate HTML using contenteditable?

I'm exploring the idea of using contenteditable on a website at visitor comments and at a message board. As I only wish to accept a white-list of HTML tags and attributes the question of when and how should I validate the entered HTML content comes up. How would you do it? What cross-browser solutions would you choose to use? What even...

Custom validatior in ASP.net

Hi there. I'm working on an ASP.NET/C# app. I have 2 text boxes and I need to validate if the input text for both of them are not both null ex: if(string.IsNullOrEmpty(TextBox1.Text) && string.IsNullOrEmpty(TextBox2.Text) ) //FAIL!!! else // OK! that is, at least one txtBox has values I was planning on using a custom validat...

Why won't this Schema validate this XML file?

The XML file: <Lista count="3"> <Pelicula nombre="Jurasic Park 3"> <Genero>Drama</Genero> <Director sexo="M">Esteven Spielberg</Director> <Temporada> <Anho>2002</Anho> <Semestre>Verano</Semestre> </Temporada> </Pelicula> <Pelicula nombre="Maldiciones"> <Genero>Ficcion</Genero> <Director sexo="...

Validating existing JavaScript code (for more than checking entry). Example: Email and Particular Characters etc.

Hi, I'm wondering if someone can help me. I have recently used this tutorial: http://net.tutsplus.com/tutorials/php/create-a-signup-form-with-email-confirmation/ to develop a more complex sign up form for a competition for a client. Basically, the way the validation has been done is different to many other validation methods I've used ...

ASP.NET MVC 2.0 Validation and ErrorMessages

I need to set the ErrorMessage property of the DataAnnotation's validation attribute in MVC 2.0. For example I should be able to pass an ID instead of the actual error message for the Model property, for example... [StringLength(2, ErrorMessage = "EmailContentID")] [DataType(DataType.EmailAddress)] public string Email { get; s...

ASP.NET MVC2 - How to have a non-required field?

Hi there All my fields seem to be required by default as I am getting a server-validation message "enter title" in my validation summary box. How do I make this field not required? I havent declared anything explicitly in the ViewModel & the front-side code is simply Html.DropDownListFor Any help would be really appreciated~! ...

form validation without reset

Hi guys Is there a way to check the data sent by a form to a PHP page return to the form page WITHOUT resetting the data sent and show a error? The form has 20 fields and I need to check one of them on a bd. If it fails the user may be redirected to the form page with the form populated and displaying a error message on the field which...

how we could create translate validate error messages on zend framework?

hello how we could create translate validate error messages on zend framework? someone could give a example ? thanks ...

jQuery validator and a custom rule that uses AJAX

Hi, I read your reply regarding the jQuery validator where you outline a method to check a username against a value in a database. Ive tried implementing this method but no matter what is returned from the PHP file I always get the message that the username is already taken. Here is ths custom method... $.validator.addMethod("uniqueU...

TinyMCE client validation problem

Hi, I have problem with TinyMCE editor. I have form with few text fields and textarea (tinymce), and enabled client validation. When I click save button validation occures on all text fields, but it takes 2 click to validate tinymce content. Furthermore, validation shows message only when field is empty, or if condition is not satisfied ...