csv-validator/src/Deblan/Validator/Constraints/Csv.php
2015-03-18 11:02:03 +01:00

26 lines
792 B
PHP

<?php
namespace Deblan\Validator\Constraints;
use Symfony\Component\Validator\Constraints\File;
class Csv extends File
{
const FIELD_NOT_VALID = 10;
const FIELD_NOT_DETECTED = 11;
const LINE_NOT_VALID = 12;
protected static $errorNames = [
self::FIELD_NOT_VALID = 'FIELD_NOT_VALID',
self::FIELD_NOT_DETECTED = 'FIELD_NOT_DETECTED',
self::LINE_NOT_VALID = 'LINE_NOT_VALID',
];
public $fieldsConstraints = [];
public $lineConstraints = [];
public $fieldNotValidMessage = 'The field {{ field }} of the line {{ line }} is not valid. {{ message }}';
public $fieldNotDetectedMessage = 'The field {{ field }} of the line {{ line }} is missing.';
public $lineNotValidMessage = 'The line {{ line }} is not valid. {{ message }}';
}