default
[ class tree: default ] [ index: default ] [ all elements ]

Class: HTML_QuickForm_Rule_In_Array_Keys

Source Location: /pear/HTML/QuickForm/Rule/In_Array_Keys.php

Class Overview

HTML_QuickForm_Rule
   |
   --HTML_QuickForm_Rule_In_Array_Keys



Methods


Inherited Variables

Inherited Methods

Class: HTML_QuickForm_Rule

HTML_QuickForm_Rule::getValidationScript()
Returns the javascript test (the test should return true if the value is INVALID)
HTML_QuickForm_Rule::setName()
Sets the rule name
HTML_QuickForm_Rule::validate()
Validates a value

Class Details

[line 23]


[ Top ]


Class Methods


method validate [line 36]

bool validate( mixed $selected_key, array $array)

Tests whether input for parameter selected_key is a key in the supplied array. Useful when dealing with selects and you'll make sure that the user selects only one of the available options and not a custom one.

Returns boolean true if selection is valid.




Tags:

access:  public


Overrides HTML_QuickForm_Rule::validate() (Validates a value)

Parameters:

mixed   $selected_key   Selected array key
array   $array   Array with available options

[ Top ]


Documentation generated on Sun, 08 Jan 2012 17:51:52 +0100 by phpDocumentor 1.4.3