JSP: Validating Currency.

Discussion in 'OT Technology' started by RaginBajin, Mar 29, 2004.

  1. RaginBajin

    RaginBajin Have you punched a donkey today?

    Joined:
    Dec 24, 2001
    Messages:
    8,740
    Likes Received:
    0
    Location:
    NoVA
    I am working on a JSP site. We handle international users that put in monetary values. I need to validate that they are entering in correct values based on the country they are from.

    For example if a person from Japan enters a value then it should be all integers but no decimal places. With a person from the US they will have a period and 2 numbers after it. Someone from Argentina needs to have a comma instead of a period, etc.

    I am wondering how everyone handles this in and outside of JSP.
     
  2. CompiledMonkey

    CompiledMonkey New Member

    Joined:
    Oct 26, 2001
    Messages:
    8,528
    Likes Received:
    0
    Location:
    Richmond, VA
    Sounds like a good use of regular expressions. I haven't used them much myself, but it sounds like they could help you out here.
     
  3. RaginBajin

    RaginBajin Have you punched a donkey today?

    Joined:
    Dec 24, 2001
    Messages:
    8,740
    Likes Received:
    0
    Location:
    NoVA
    That's the direction that I was already heading.. Just wanted to see if someone else has expierenced this and what their solutions were before I forge ahead with reg ex's.
     
  4. CompiledMonkey

    CompiledMonkey New Member

    Joined:
    Oct 26, 2001
    Messages:
    8,528
    Likes Received:
    0
    Location:
    Richmond, VA
    I would check with Astro on regular expressions. It is my belief he's had a lot of experience with them.
     
  5. znaps

    znaps Guest

Share This Page