W3cubDocs

/Symfony 2.7

Symfony\Component\Validator\Validation

class Validation

Entry point for the Validator component.

Constants

API_VERSION_2_4

The Validator API provided by Symfony 2.4 and older.

API_VERSION_2_5

The Validator API provided by Symfony 2.5 and newer.

API_VERSION_2_5_BC

The Validator API provided by Symfony 2.5 and newer with a backwards compatibility layer for 2.4 and older.

Methods

static ValidatorInterface createValidator()

Creates a new validator.

static ValidatorBuilderInterface createValidatorBuilder()

Creates a configurable builder for validator objects.

Details

static public ValidatorInterface createValidator()

Creates a new validator.

If you want to configure the validator, use {@link createValidatorBuilder()} instead.

Return Value

ValidatorInterface The new validator.

static public ValidatorBuilderInterface createValidatorBuilder()

Creates a configurable builder for validator objects.

Return Value

ValidatorBuilderInterface The new builder.

© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.7/Symfony/Component/Validator/Validation.html