Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
T

therainking78

@therainking78
About
Posts
4
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • What is a good year for VS?
    T therainking78

    Yes there is an update in the .net for VS2013 to confirm that post I like 2012 and 2013 the intellisense in C++ for myself I suppose that's preference though and the snippets features are improved also I use the snippets designer to add them I suppose you could just manipulate the XML yourself Microsoft explains the method on developer site. All in all there are more features to choose from but I'm still not sold that 2013 is that much better. I'm sure I'll discover more features and decide it is but either of them are improvement over 2010.

    The Lounge question visual-studio

  • form validation
    T therainking78

    Thanks I turned on brace matching for vs2010 and picked up on it. Appreciate it. :)

    JavaScript javascript com regex question

  • form validation
    T therainking78

    Thanks a ton I finally put all validated that form. Good call.

    JavaScript javascript com regex question

  • form validation
    T therainking78

    I had this form validating now it won't even run the first function. Any suggestions?

    // JavaScript Document
    function formValidation()
    {
    var uid = document.registration.userid;
    var uname = document.registration.username;
    var uadd = document.registration.address;
    var uzip = document.registration.zip;
    var uemail = document.registration.email;
    if(userid_validation(uid))
    {
    if(allLetter(uname))
    {
    if(alphanumeric(uadd))
    {
    if(allnumeric(uzip))
    {
    if(ValidateEmail(uemail))
    {
    }
    }
    }
    }
    return false;
    }
    function userid_validation(uid)
    {
    var letters = /^[A-Za-z]+$/;
    var uid_len = uid.value.length;
    if (uid.value.match(letters))
    {
    return true;
    }
    else
    {
    alert("The First Name can not be empty/must contain only letters");
    uid.focus();
    return false;
    }
    }
    function allLetter(uname)
    {
    var letters = /^[A-Za-z]+$/;
    if (uname.value.match(letters))
    {
    return true;
    }
    else
    {
    alert("The Last Name can not be empty/must contain only letters");
    uname.focus();
    return false;
    }
    }
    function alphanumeric(uadd, num)
    {
    var uadd_len = uadd.value.length;
    var numbers = /^[0-9]+$/;
    if (uadd.value.match(numbers))
    {
    return true;
    }
    else
    {
    alert("Your phone number must have a 10 digits all numbers");
    uadd.focus();
    return false;
    }
    }
    function allnumeric(uzip)
    {
    var numbers = /^[0-9]+$/;
    if (uzip.value.match(numbers))
    {
    return true;
    }
    else
    {
    alert("You must fill in your ZIP code with five numeric characters");
    uzip.focus();
    return false;
    }
    }
    function ValidateEmail(uemail)
    {
    var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
    if(uemail.value.match(mailformat))
    {
    alert("Form Succesfully Submitted");
    window.location.reload();
    return true;
    }
    else
    {
    alert("You have entered an invalid email address!");
    uemail.focus();
    return false;
    }

    }

    chrishoy78@gmail.com

    JavaScript javascript com regex question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups