🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #19704

validation of a text field...

#19704
From: Dhruva Reddy
Date: Mon, 05 Jan 1998 00:00
17 lines
1139 bytes
Is there an easy way to validate the contents of a text field?  I would
like to confirm that the contents are a dollar amount (can be
represented by a float with no more than two decimal places).

Do I need to subclass TextField?  I had thought of using Float.valueOf()
to actually turn the contents into a float, but how do I make sure that
there are no more than two decimal places?

Thanks,
DR
--
-----------------------------------------------------------
Dhruva B. Reddy   mailto:dreddy@cgi.com
Carnegie Group, Inc.  707 17th Street, Suite 2100
(303) 295 0366 x336  Denver, CO 80202, USA
-----------------------------------------------------------
Technical Details
Message-ID: <34B12F9A.83995A4A@cgi.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,71196d8c325add3a,start
X-Google-Attributes: gidf74b3,public
From: Dhruva Reddy <dreddy@cgi.com>
Subject: validation of a text field...
Date: 1998/01/05
Message-ID: <34B12F9A.83995A4A@cgi.com>
X-Deja-AN: 313037337
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
Organization: Carnegie Group, Inc.
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language