Tagged: 

Viewing 1 reply thread
  • Author
    Posts
    • #7112
      amristar
      Member

      Hi!

      Please, help me. How can I check that the contents of the text box is a number?
      Something like this:
      ‘validate’ => array(
      array(
      ‘type’ => ‘numeric’
      )
      )

    • #7121
      Steve
      Keymaster

      You can register your own validation function.

      Use the callback method here >

      Untested, but this should work:

      function my_validate_numeric($file, $field, $arguments)
      {
        return is_numeric($file) ? true : 'is not numeric.';
      }
Viewing 1 reply thread
  • You must be logged in to reply to this topic.