\ZenValidator
- Author: <shea@silverstripe.com.au>
- License: BSD License http://www.silverstripe.org/bsd-license
Synopsis
class ZenValidator
extends Validator
{
- // members
- private static boolean $default_js = true;
- protected array $constraints = ;
- protected $parsleyEnabled;
- protected $defaultJS;
- // methods
- public void __construct()
- public void setForm()
- public static void globalRequirements()
- public $this applyParsley()
- public this disableParsley()
- public boolean parsleyIsEnabled()
- public $this setConstraint()
- public $this setConstraints()
- public ZenValidatorConstraint getConstraint()
- public array getConstraints()
- public $this removeConstraint()
- public $this removeConstraints()
- public this addRequiredFields()
- protected void debug()
- public boolean php()
- public void removeValidation()
- public void removeAllValidation()
- public bool fieldIsRequired()
Hierarchy
Extends
- SilverStripe\Forms\Validator
Uses
- SilverStripe\Core\Config\Configurable
Members
private
- $default_js — boolean
protected
- $constraints
—
array
constraints assigned to this validator - $defaultJS — boolean
- $parsleyEnabled — boolean
Methods
protected
public
- __construct()
- addRequiredFields() — A quick way of adding required constraints to a number of fields
- applyParsley() — applyParsley
- disableParsley() — disableParsley
- fieldIsRequired() — Returns whether the field in question is required. This will usually display '*' next to the field.
- getConstraint() — get a constraint by fieldName, constraintName
- getConstraints() — get constraints by fieldName
- globalRequirements() — Helper function, but feel free to include your own
- parsleyIsEnabled() — parsleyIsEnabled
- php() — Performs the php validation on all ZenValidatorConstraints attached to this validator
- removeAllValidation() — Removes all constraints from this validator.
- removeConstraint() — remove a constraint from a field
- removeConstraints() — remove all constraints from a field
- removeValidation() — This method is not imeplemented because form->transform calls it, but not all FormTransformations necessarily want to remove validation... right? Use removeAllValidation() instead.
- setConstraint() — setConstraint - sets a ZenValidatorContraint on this validator
- setConstraints() — setConstraints - sets multiple constraints on this validator
- setForm()