Form validation javascript

  • Status Closed
  • Budget $30 - $250 USD
  • Total Bids 3

Project Description

Form validation Javascript

Below is the form with 3 field to be validated.

<center><form method="post" action="">

<input type="hidden" name="meta_web_form_id" value="">

<input type="hidden" name="meta_split_id" value="">

<input type="hidden" name="unit" value="">

<input type="hidden" name="redirect" value="" id="">

<input type="hidden" name="meta_redirect_onlist" value="">

<input type="hidden" name="meta_adtracking" value="tracking">

<input type="hidden" name="meta_message" value="1">

<input type="hidden" name="meta_required" value="">

<input type="hidden" name="meta_forward_vars" value="1">


<tr><td colspan=2><center></center></td></tr>

<tr><td>Name:</td><td><input type="text" name="name" value="" size="20"></td></tr>

<tr><td>Email:</td><td><input type="text" name="from" value="" size="20"></td></tr>

<tr><td>zip:</td><td><input type="text" name="custom zip" value="" size="20"></td></tr>

<tr><td colspan=2><center></center></td></tr>

<tr><td align="center" colspan="2"><input type="submit" name="submit" value="Submit"></td></tr>




Then field name cannot be changed as it is a requirement for aweber.

The 3 field to be validated are:



custom zip

All error are to be in the form of a popup using:

alert("Error here");

Validate name (name)

Nothing has been submitted, name field is empty

Error message: "Zip/Postal code is required."

Correct format no special characters only alphabet used (A-Z a-z)

Error message "Your name can only contain letters of the alphabet."

No spaces, only one word for name field

Error message "Please enter only your first name."

Validate the email address (from)

Correct email address format or nothing submitted - Use Regular Expressions for valid email address format

Error message: "Enter a valid email address."

Validate the USA postal/zip code. (custom zip)

Nothing has been submitted or custom zip field is empty

Error message: "Zip/Postal code is required."

custom zip field is = five characters

Error message: "Zip/Postal code should be five characters."

custom zip field cannot contain spaces

Error message: "Zip/Postal code cannot have spaces"

custom zip field can only contain valid USA zipcode characters - Use Regular Expressions for valid USA zip code formats

Error message: "Zip/Postal code contains invalid characters."

This should be a very easy job for some experienced in JavaScript I am prepared to pay no more than $30 for this easy job and require it to be done ASAP.

Get free quotes for a project like this
Awarded to:
Skills Required

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online