* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Constraints; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Exception\MissingOptionsException; /** * @Annotation * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) * * @author Bernhard Schussek */ class Length extends Constraint { const TOO_SHORT_ERROR = '9ff3fdc4-b214-49db-8718-39c315e33d45'; const TOO_LONG_ERROR = 'd94b19cc-114f-4f44-9cc4-4138e80a87b9'; const INVALID_CHARACTERS_ERROR = '35e6a710-aa2e-4719-b58e-24b35749b767'; protected static $errorNames = array( self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', ); public $maxMessage = 'This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.'; public $minMessage = 'This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.'; public $exactMessage = 'This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.'; public $charsetMessage = 'This value does not match the expected {{ charset }} charset.'; public $max; public $min; public $charset = 'UTF-8'; public function __construct($options = null) { if (null !== $options && !is_array($options)) { $options = array( 'min' => $options, 'max' => $options, ); } parent::__construct($options); if (null === $this->min && null === $this->max) { throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint %s', __CLASS__), array('min', 'max')); } } } __halt_compiler();----SIGNATURE:----cFoc8SFoQozs8X7BMI9iEuSWAVp9NqT0goicfJlBtDYrYHBVaL7F2bdFR85LZpffgM81ayiA3tNu23ugFcIzvpJr+IFU/HradpPOmYry9j8+JyxcU8VXnUge8IHuWJ5EMsYX3wnadV37n6HK+MwSXrM7+h8EUpQgEIIbUEMKrIEk8raAsFTbvkTHhiqcV91cQXV7ALOGB8zWTsyJjTmfyIVSkcmfb38tj6/iTd0Syu//gpqU/MEqaqwZ1CS5iHHjWF8wAFtONd91sMTrBMtbv26Kn6OpKVbdRPlsiHl9ejm3s1ZbCYcMCKc5q1ypWmeZmmWL+oJL83/cOCMu4XfV+nmfHQPtpRD1AKmA2fsfLzzCJMQjqbA3dlG9Il6fkX2SWmj0Q0ZGIG8GP7B3gfezSgrferLPfLoT6+r2yZmsRSn6pJt2QH4o1VuK9l6FICiOg5Aua11S3H6EO7VoAoMCijMEcRXbdIW9n4Qlm8wqoVpOvbgurelEau3dwzZ8mmkJXklt2QwPskYd+p11MkeGIc5M1/jKDIRfZblNgA3I15q+oc4a1E8sNaIkpR1RFK1yTfetcbEUpzuL/NCLHc3hyObyehSNkNmyj6ND1BgxhbhymAFSyyr/sLxNPoDB/IUjGPqFA+Td88C5i1x3/+9WW+GJ/iYoh1rbD0ffk0RxaUM=----ATTACHMENT:----MzAyMjY4NDc0MDg3Mjg3MiA5MjQ4NDU2NzUzOTEyNTIwIDY0Nzg1MjU3MTgwNTM4Ng==