toa / validator-bundle
Validator Bundle for Symfony2
Installs: 1 868
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Type:symfony-bundle
This package is not auto-updated.
Last update: 2024-12-16 16:25:33 UTC
README
This bundle integrates ToaValidatorComponent into Symfony ~2.1 projects.
Installation
Add this bundle to your composer.json
file:
{
"require": {
"toa/validator-bundle": "dev-master"
}
}
Register the bundle in app/AppKernel.php
:
// app/AppKernel.php
public function registerBundles()
{
return array(
// ...
new Toa\Bundle\ValidatorBundle\ToaValidatorBundle(),
);
}
Configuration
Enable the bundle's constraints in app/config/config.yml
:
# app/config/config.yml
toa_validator:
csv: true
audio: true
video: true
If you set audio: true
or video: true
you can configure the paths to the ffmpeg/ffprobe binaries in app/config/parameters.yml
:
parameters:
toa_validator.helper.ffmpeg.binary_ffmpeg: /usr/bin/ffmpeg #default
toa_validator.helper.ffmpeg.binary_ffprobe: /usr/bin/ffprobe #default
Credits
The ffmpeg.xml is heavily inspired by Symfony ffmpeg bundle.