Jump to main content Jump to doc navigation

xPDOObject::addValidationRule()

Add a validation rule to an object field for this instance.

Syntax

API Docs: http://api.modxcms.com/xpdo/om/xPDOObject.html#addValidationRule

void addValidationRule (
   string $field,
   string $name,
   string $type,
   string $rule,
   [array $parameters = array()]
)