Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2012
    Thanked 0 Times in 0 Posts

    Length Property/Function in JavaScript

    Hi Guys,

    I'm very new to JavaScript. I need help with the following exercise relating to length property and email validation.

    "Create a form and add validation for three fields such as name (must enter at least five characters), Zip (must have number only and must be five digits) and Email-must be valid email".

    Thank you


  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    London, England
    Thanked 2,573 Times in 2,551 Posts
    This forum is not a free coding service. As a general rule, the people helping out in this forum don't write code for others (especially code that appears to be for homework), but try to help with fixing code that doesn't work. You may perhaps get someone to write this script for you, but you'll be far more likely to get help if you have made a substantial effort and written some code yourself. Then someone here will almost certainly help you correct/improve your work.

    Form validation (including email) has been covered a zillion times in this forum. Remember that a proper name may only contain letters, hyphen, space and apostrophe (and not any five+ characters). So the length property is not very useful here.

    Google for "Javascript regular expressions".

    It is your responsibility to die() if necessary….. - PHP Manual
    Last edited by Philip M; 07-03-2012 at 02:18 PM.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts