2 namespace TYPO3\CMS\Form\Domain\Validator;
23 'element' => array(
'',
'The name of the element',
'string',
true),
24 'errorMessage' => array(
'',
'The error message',
'array',
true),
25 'minimum' => array(
'',
'The minimum value',
'integer',
true),
26 'maximum' => array(
'',
'The maximum value',
'integer',
true),
27 'inclusive' => array(
'',
'Minimum and maximum value are inclusive in comparison',
'integer',
false),
47 !isset($this->options[
'inclusive'])
48 || $this->options[
'inclusive'] ===
''
49 || (
int)$this->options[
'inclusive'] === 0
51 if ($value <= $this->options[
'minimum'] || $value >= $this->options[
'maximum']) {
54 $this->options[
'errorMessage'][0],
55 $this->options[
'errorMessage'][1],
62 if ($value < $this->options[
'minimum'] || $value > $this->options[
'maximum']) {
65 $this->options[
'errorMessage'][0],
66 $this->options[
'errorMessage'][1],
85 $label = static::LOCALISATION_OBJECT_NAME .
'.' . $type;
86 $messages[] = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate($label,
'form');
87 if ($this->inclusive) {
88 $messages[] = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate($label . 2,
'form');
90 $message = implode(
', ', $messages);
104 array(
'%minimum',
'%maximum'),
105 array($this->options[
'minimum'], $this->options[
'maximum']),