Class ValidatorManager

Interface ValidatorManagerInterface A generic validator manager interface that enables validating against many validators at once

Concrete\Core\Validator\ValidatorManager implements Concrete\Core\Validator\ValidatorManagerInterface
Namespace: Concrete\Core\Validator
Package: Concrete\Core\Validator
Located at src/Validator/ValidatorManager.php

Methods summary

public string[]
# getRequirementStrings( )

Get the validator requirements in the form of an array keyed by it's respective error code

public Concrete\Core\Validator\ValidatorInterface[]
# getValidators( )

Get a list of all validators

public boolean
# hasValidator( string $handle )

Does a validator with this handle exist

# setValidator( string $handle, Concrete\Core\Validator\ValidatorInterface $validator = null )

Add a validator to the stack. Validators are unique by handle, so adding a validator with the same handle as a validator in the stack replaces the old validator with the new one.

public boolean
# isValid( mixed $mixed, ArrayAccess $error = null )

Is this mixed value valid based on the added validators

Properties summary

protected array $validators
# array()