/RuncomEanValidationBundle

Symfony2 EAN8/EAN13 validation constraints annotation

Primary LanguagePHPGNU General Public License v3.0GPL-3.0

RuncomEanValidationBundle Build Status Latest Stable Version Total Downloads Latest Unstable Version License

This bundle provides validation constraints for EAN8 and EAN13 with annotations.

Installation

{
    "require": {
        "runcom/ean-validation-bundle": "~0.1"
    }
}

register the bundle in your AppKernel.php

$bundles[] = new Runcom\EanValidationBundle\RuncomEanValidationBundle();

Usage

    use Runcom\EanValidationBundle\Validator\Constraints\Ean;

    // ...

    /**
     * @Ean
     */

Or just initialize new Ean() in your forms.