diff --git a/src/Plugin/CvValidator/Max.php b/src/Plugin/CvValidator/Max.php index 58598a3..f10a256 100644 --- a/src/Plugin/CvValidator/Max.php +++ b/src/Plugin/CvValidator/Max.php @@ -26,7 +26,7 @@ class Max extends CvValidatorBase { // rule. return [ 'messages' => [ - 'max' => $this->t('The value in @title has to be less than @max.', ['@title' => $this->getElementTitle($element), '@max' => $this->getAttributeValue($element, 'max')]), + 'max' => $this->t('The value in @title has to be less than @max.', ['@title' => strtolower($this->getElementTitle($element)), '@max' => $this->getAttributeValue($element, 'max')]), ], ]; } diff --git a/src/Plugin/CvValidator/Min.php b/src/Plugin/CvValidator/Min.php index c04b63a..73ce630 100644 --- a/src/Plugin/CvValidator/Min.php +++ b/src/Plugin/CvValidator/Min.php @@ -26,7 +26,7 @@ class Min extends CvValidatorBase { // rule. return [ 'messages' => [ - 'min' => $this->t('The value in @title has to be greater than @min.', ['@title' => $this->getElementTitle($element), '@min' => $this->getAttributeValue($element, 'min')]), + 'min' => $this->t('The value in @title has to be greater than @min.', ['@title' => strtolower($this->getElementTitle($element)), '@min' => $this->getAttributeValue($element, 'min')]), ], ]; } diff --git a/src/Plugin/CvValidator/Step.php b/src/Plugin/CvValidator/Step.php index 2d91eec..7a3ceca 100644 --- a/src/Plugin/CvValidator/Step.php +++ b/src/Plugin/CvValidator/Step.php @@ -27,13 +27,13 @@ class Step extends CvValidatorBase { if (($min = $this->getAttributeValue($element, 'min'))) { return [ 'messages' => [ - 'step' => $this->t('The value in @title has to be greater than @min by steps of @step.', ['@title' => $this->getElementTitle($element), '@step' => $step, '@min' => $min]), + 'step' => $this->t('The value in @title has to be greater than @min by steps of @step.', ['@title' => strtolower($this->getElementTitle($element)), '@step' => $step, '@min' => $min]), ], ]; } return [ 'messages' => [ - 'step' => $this->t('The value in @title has to be divisible by @step.', ['@title' => $this->getElementTitle($element), '@step' => $step]), + 'step' => $this->t('The value in @title has to be divisible by @step.', ['@title' => strtolower($this->getElementTitle($element)), '@step' => $step]), ], ]; }