View Full Version : How to Validate only for Numbers
I have a TextField in which i want to allow the user to enter only Numbers and Decimal point. Kindly tell me how do this.
25 Jun 2009, 8:48 AM
(1) Use NumberField which extends TextField and is meant to only allow entry of numbers. There are some nice methods to set the format with this.
(2) Use a validator with the TextField (why if we have a NumberField) - the problem here, is the validator is only called I believe if the field is requird? (not sure on this).
I would go with NumberField.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.