1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need help for Script Validation

Discussion in 'HTML & JavaScript' started by gary2, Aug 5, 2014.

Tags:
  1. gary2

    gary2 Jr. VIP Jr. VIP Premium Member

    Joined:
    Jan 20, 2013
    Messages:
    969
    Likes Received:
    82
    Occupation:
    Inbound Marketer. Blogger. Author.
    Location:
    Near River
    I have a struts web application and i want to do a scripting validation in JSP page by using Javascript.

    I have a text fields for validation are,

    1. Email
    Conditions we have to check for email text filed: It must be in email pattern.

    2. PhoneNumber
    Condition: It doesn't allow alphabets, The phone number length must be 10.

    3. Payment
    Condition:It doesn't allow alphabets and the last three digit must be XXX.00 or XXX like this

    Can any one help me .....
     
  2. The Watcher

    The Watcher Newbie

    Joined:
    Aug 21, 2014
    Messages:
    4
    Likes Received:
    3
    If you will post or PM me the code for the form, I can easily produce the script you need.
     
  3. journeycoder

    journeycoder Newbie

    Joined:
    Aug 31, 2014
    Messages:
    27
    Likes Received:
    3
    Occupation:
    Coder: asp.net, js, php,wordpress, genesis,tools,
    Location:
    bestmicroovens.com
    Home Page:
    I'm a programmer, the code you require is simple. But when I post the code javascript on your website does not allow me to, and received the following message

    Code:
    [COLOR=#ff0000]You are NOT allowed to post URLs, email addresses and images, until  after you have been a member of BHW for a little longer. We did this is  to cut down on spam. Thank you for understanding[/COLOR]
    How do I post them here, or you PM me and I'll send you the code.
     
  4. Gogol

    Gogol Elite Member

    Joined:
    Sep 10, 2010
    Messages:
    3,062
    Likes Received:
    2,872
    Gender:
    Male
    Email validation:
    Code:
    http://stackoverflow.com/questions/46155/validate-email-address-in-javascript
    Phone number validation
    Code:
    http://stackoverflow.com/questions/2386054/javascript-phone-number-validation
    Amount validation
    Code:
    http://stackoverflow.com/questions/18082/validate-decimal-numbers-in-javascript-isnumeric