Validating a text field


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Validating a text field

  1. #1
    Ralph Carrasquillo Jr Guest

    Validating a text field


    Hi I'm just starting out with java.... I was given a job which needs to validate
    text fields.
    The question is there a built in java function that handles this, checking
    for alphanumeric, numeric, periods etc...

    Any input is always greatly appreciated,
    Ralph C.

  2. #2
    Paul Clapham Guest

    Re: Validating a text field

    No, Java methods tend to be more specifically focussed than that. So
    there's no "validate" method because that encompasses a whole bag of
    validations. But if you had specific functions in mind, such as "is that a
    valid dollar amount" or "is that a valid date", then there are Java methods
    for those things. Such as Integer.parseInt(String),
    Float.parseFloat(String), DateFormat.parse(String). If you want to validate
    other things such as credit card numbers, you won't find standard Java
    methods for this but you may find that other people have written them
    already. There's a lot of Java code available on the Internet if you look
    for it.

    PC2

    Ralph Carrasquillo Jr <Ralph_Carrasquillo@NineWest.com> wrote in message
    news:39f864b2$1@news.devx.com...
    >
    > Hi I'm just starting out with java.... I was given a job which needs to

    validate
    > text fields.
    > The question is there a built in java function that handles this, checking
    > for alphanumeric, numeric, periods etc...
    >
    > Any input is always greatly appreciated,
    > Ralph C.




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center