Built-in Key-Value Validators.
The WFKeyValueValidators class provides a bunch of commonly used validators.
Located in /framework/util/WFKeyValueValidators.php (line 18)
WFObject | --WFKeyValueValidators
Validate email addresses.
Options: required: Whether to make the value required. Default false. key: What to display as the "field" title in error messages. Default: "Email".
Validate a phone number.
Pretty flexible; allows any character(s) as separators. Just tries to be sure that there are the right number of digits in the right number of groups.
Doesn't allow extensions.
Options: required: Whether to make the value required. Default false. key: What to display as the "field" title in error messages. Default: "Email". country: Country Code to use for validation. Default US.
Validate a postal code.
Options: required: Whether to make the value required. Default false. key: What to display as the "field" title in error messages. Default: "Email". country: Country Code to use for validation. Default US.
Validate URL.
Uses filter_var($value, FILTER_VALIDATE_URL) to verify a URL. Will also try pre-pending http:// if no scheme is present.
Options: required: Whether to make the value required. Default false. key: What to display as the "field" title in error messages. Default: "Email".
Inherited From WFObject
WFObject::__construct()
WFObject::exposedProperties()
WFObject::getClass()
WFObject::keyPathToTargetAndKey()
WFObject::setValueForKey()
WFObject::setValueForKeyPath()
WFObject::setValuesForKeys()
WFObject::validatedSetValueForKey()
WFObject::validatedSetValueForKeyPath()
WFObject::validateObject()
WFObject::validateValueForKey()
WFObject::validateValueForKeyPath()
WFObject::valueForKey()
WFObject::valueForKeyPath()
WFObject::valueForStaticKey()
WFObject::valueForStaticKeyPath()
WFObject::valueForTargetAndKeyPath()
WFObject::valueForUndefinedKey()
WFObject::valueForUndefinedStaticKey()
WFObject::valuesForKeyPaths()
WFObject::valuesForKeys()
WFObject::_valueForStaticKey()
WFObject::__toString()
Documentation generated on Thu, 14 May 2009 16:20:08 -0400 by phpDocumentor 1.4.2