| [ Index ] |
PHP Cross Reference of Web Application Component Toolkit |
[Source view] [Print]
(no description)
| Version: | $Id: rule.inc.php,v 1.1 2004/11/16 01:55:37 jeffmoore Exp $ |
| File Size: | 231 lines (6 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
rule:: (2 methods):
setgroup()
validate()
singlefieldrule:: (6 methods):
singlefieldrule()
getfield()
error()
isvalid()
validate()
check()
requiredrule:: (2 methods):
requiredrule()
validate()
sizerangerule:: (2 methods):
sizerangerule()
check()
| setgroup($Group) X-Ref |
| Sets the error message group (related to the vars file) access: public param: string group return: void |
| validate(&$DataSource, &$ErrorList) X-Ref |
| Perform validation access: protected param: DataSource - subclass to validate param: ErrorList return: boolean (always TRUE is base class) |
Class: singlefieldrule - X-Ref
Rules responsbile for validating a single field descend from this class.| singlefieldrule($fieldname) X-Ref |
| Constructs Rule access: public param: string fieldname to validate |
| getfield() X-Ref |
| Returns the fieldname the rule applies to access: public return: string name of field |
| error($id, $values = NULL) X-Ref |
| Signal that an error has occurred. access: protected param: string id of the error param: optional data regarding the error |
| isvalid() X-Ref |
| Have we already determined this error to be invalid? access: protected param: string id of the error param: optional data regarding the error |
| validate(&$DataSource, &$ErrorList) X-Ref |
| Perform validation access: public param: DataSource - Data to validate param: ErrorList return: boolean (always TRUE is base class) |
| check($value) X-Ref |
| Check a Single Value to see if its valid access: protected param: value - to check |
Class: requiredrule - X-Ref
For fields which must be supplied a value by the user| requiredrule($fieldname) X-Ref |
| Constructs RequiredRule access: public param: string fieldname to validate |
| validate(&$DataSource, &$ErrorList) X-Ref |
| Performs validation access: public param: DataSource - data to validate param: ErrorList return: boolean TRUE if validation passed |
Class: sizerangerule - X-Ref
For fields have a minimum and maximum length| sizerangerule($fieldname, $minLength, $maxLength = NULL) X-Ref |
| Constructs SizeRangeRule access: public param: string fieldname to validate param: int Minumum length param: int Maximum length (optional) |
| check($value) X-Ref |
| Performs validation of a single value access: protected |
| Generated: Sun Nov 28 19:36:09 2004 | Cross-referenced by PHPXref 0.5 |