Moodle  2.2.1
http://www.collinsharper.com
HTML_QuickForm_Rule_Required Class Reference
Inheritance diagram for HTML_QuickForm_Rule_Required:
Collaboration diagram for HTML_QuickForm_Rule_Required:

Public Member Functions

 validate ($value, $options=null)
 getValidationScript ($options=null)

Detailed Description

Required elements validation

Version:
1.0

Definition at line 27 of file Required.php.


Member Function Documentation

getValidationScript ( options = null)

Returns the javascript test (the test should return true if the value is INVALID)

Parameters:
mixedOptions for the rule public
Returns:
array first element is code to setup validation, second is the check itself

Reimplemented from HTML_QuickForm_Rule.

Definition at line 46 of file Required.php.

validate ( value,
options = null 
)

Checks if an element is empty

Parameters:
string$valueValue to check
mixed$optionsNot used yet public
Returns:
boolean true if value is not empty

Definition at line 37 of file Required.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations