csv-validator/src/Deblan/CsvValidator/Constraints/Csv.php

26 lines
795 B
PHP
Raw Normal View History

2015-03-18 11:02:03 +01:00
<?php
2016-05-20 12:01:26 +02:00
namespace Deblan\CsvValidator\Constraints;
2015-03-18 11:02:03 +01:00
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 }}';
}