[development] Form Textfield numeric
Ted
ted-drupalists at webfirst.com
Thu Mar 10 17:11:46 UTC 2011
On 3/10/2011 11:46 AM, Damian Adriel Perez Valdes wrote:
> ...i need to validate if the textfield data are numeric or not. can i
> use a drupal functions for this ?
>
Looks like you got your answer before I could hit send. Here's some more
links and info:
For Drupal 6, read the Form API Quickstart Guide
(http://drupal.org/node/751826, search for "Validating Forms"), which is
linked from the main Form API doc page (http://drupal.org/node/204270).
You can also read about the #validate and #element_validate attributes
at [1] and [2].
For Drupal 7, things are mostly the same, at least as far as validation
goes. See http://randyfay.com/taxonomy/term/21 for some other changes if
you're interested.
[1]
http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/6#validate
[2]
http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/6#element_validate
More information about the development
mailing list