From 38f69169d717d06ca2d1499fa8037c2adc2a1afe Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Wed, 20 Aug 2008 22:12:10 +0000 Subject: --- user_guide/libraries/validation.html | 49 +++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 14 deletions(-) (limited to 'user_guide') diff --git a/user_guide/libraries/validation.html b/user_guide/libraries/validation.html index e05cf36d8..8b36e09ba 100644 --- a/user_guide/libraries/validation.html +++ b/user_guide/libraries/validation.html @@ -576,43 +576,64 @@ For example, your "username" error will be available at:
$this->valida Returns FALSE if the form element contains anything other than alpha-numeric characters, underscores or dashes.   + - numeric - No - Returns FALSE if the form element contains anything other than numeric characters. -   +numeric +No +Returns FALSE if the form element contains anything other than numeric characters. +  - + integer No Returns FALSE if the form element contains anything other than an integer.   - + + +is_natural +No +Returns FALSE if the form element contains anything other than a natural number: 0, 1, 2, 3, etc. +  + + + +is_natural_no_zero +No +Returns FALSE if the form element contains anything other than a natural number, but not zero: 1, 2, 3, etc. +  + + + valid_email No Returns FALSE if the form element does not contain a valid email address.   + - valid_emails - No - Returns FALSE if any value provided in a comma separated list is not a valid email. -   +valid_emails +No +Returns FALSE if any value provided in a comma separated list is not a valid email. +  + valid_ip No Returns FALSE if the supplied IP is not valid.   + - valid_base64 - No - Returns FALSE if the supplied string contains anything other than valid Base64 characters. -   +valid_base64 +No +Returns FALSE if the supplied string contains anything other than valid Base64 characters. +  + +

Note: These rules can also be called as discrete functions. For example:

-- cgit v1.2.3-24-g4f1b