Input_Item::validate

Input_Item::validate — Validates the specified data.

Description

public mixed Input_Item::validate ( string $method, mixed $data [, mixed $options] )

Parameters

  1. method
    A valid Validation method.
  2. data
    The data which will be validated.
  3. options
    Options sent to the validation method. Only required in special cases.

Return Values

If $data is not set, NULL will be returned. FALSE is returned on validation failure and TRUE returns of everything's OK.

Examples

http://example.com/?email=someemail@host.com

if ($input->get ('email')->validate ('valid_email')) {
    // 'email' is a real Email address
}

See Also

input_item/validate.txt · Last modified: 2010/07/21 21:37 by davids
Back to top
CC Attribution-Share Alike 3.0 Unported
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0