Validation library for some Spanish codes.

dev-master / 1.0.x-dev 2013-11-26 17:16 UTC

This package is auto-updated.

Last update: 2020-08-10 11:36:38 UTC


This library provides some validators for common Spanish codes.

Available validators


All validators implements a common interface with only one method:

 * Validates the given value
 * Will return void if the given value is valid or will throw an
 *  \InvalidArgumentException otherwise
 * @param mixed
 * @throws \InvalidArgumentException
public function validate($value);

Integration with Symfony Validator

For each validator, a suitable Constraint and ConstraintValidator class is provided, so you can use the Symfony Validator service.

$validator = \Symfony\Component\Validation::createValidator();
$violations = $validator->validateValue('00000001Z', new \Ajgl\Validator\Es\Constraints\Dni());

Symfony Bundle

If you need to integrate these validators into your Symfony Framework app, you can install the AjglValidatorEsBundle


This library is under the MIT license. See the complete license in the LICENSE file.


  • Travis CI: Build Status
  • Poser Latest Stable Version: Latest Stable Version
  • Poser Latest Unstable Version Latest Unstable Version
  • Poser Total Downloads Total Downloads
  • Poser Monthly Downloads Montly Downloads
  • Poser Daily Downloads Daily Downloads
  • Scrutinizer Quality Scrutinizer Quality Score
  • Scrutinizer Code Coverage Code Coverage
  • Bitdeli Popularity Bitdeli Badge
  • SensionLabs Insight Quality SensioLabsInsight
  • VersionEye Dependency Status Dependency Status


This is an ajgarlag initiative.

Reporting an issue or a feature request

Issues and feature requests are tracked in the Github issue tracker.