DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  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.




Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links