Validating a text field
Hi I'm just starting out with java.... I was given a job which needs to validate
The question is there a built in java function that handles this, checking
for alphanumeric, numeric, periods etc...
Any input is always greatly appreciated,
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
Ralph Carrasquillo Jr <Ralph_Carrasquillo@NineWest.com> wrote in message
> Hi I'm just starting out with java.... I was given a job which needs to
> 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.
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