Update product review validation's notInRangeMessage

This commit is contained in:
Dmitri Perunov 2022-11-26 00:40:31 +04:00 committed by Jakub Tobiasz
parent 69fd052829
commit 52adeda398
No known key found for this signature in database
GPG key ID: 6434250CB3525233
8 changed files with 8 additions and 14 deletions

View file

@ -98,3 +98,5 @@
1. The `sylius.http_client` has become an alias to `psr18.http_client` service.
1. The `sylius.payum.http_client` has become a service ID of newly created `Sylius\Bundle\PayumBundle\HttpClient\HttpClient`.
1. Validation translation key `sylius.review.rating.range` was renamed to `sylius.review.rating.not_in_range`.

View file

@ -72,4 +72,4 @@ Feature: Product review validation
And I leave a comment "This book made me sad, but plot was fine.", titled "Not good, not bad" as "example@example.com"
And I rate it with 6 points
And I try to add it
Then I should be notified that rate must be an integer in the range 1-5
Then I should be notified that rating must be between 1 and 5

View file

@ -214,11 +214,11 @@ final class ProductReviewContext implements Context
}
/**
* @Then I should be notified that rate must be an integer in the range 1-5
* @Then I should be notified that rating must be between 1 and 5
*/
public function iShouldBeNotifiedThatRateMustBeAnIntegerInTheRange15(): void
public function iShouldBeNotifiedThatRatingMustBeBetween1And5(): void
{
$this->assertViolation('Review rating must be an integer in the range 1-5.', 'rating');
$this->assertViolation('Review rating must be between 1 and 5.', 'rating');
}
private function hasReviewsWithTitles(array $titles): bool

View file

@ -23,9 +23,7 @@
<constraint name="Range">
<option name="min">1</option>
<option name="max">5</option>
<option name="minMessage">sylius.review.rating.range</option>
<option name="maxMessage">sylius.review.rating.range</option>
<option name="notInRangeMessage">sylius.review.rating.range</option>
<option name="notInRangeMessage">sylius.review.rating.not_in_range</option>
<option name="groups">sylius</option>
</constraint>
</property>

View file

@ -100,8 +100,6 @@ sylius:
review:
author:
not_blank: Bitte geben Sie Ihre E-Mail-Adresse ein.
rating:
range: Bewertung muss eine Ganzzahl im Bereich 1-5 sein.
taxon_image:
file:
max_size: Das Bild ist zu groß - {{ size }}{{ suffix }}. Maximal zulässige Größe {{ limit }}{{ suffix }}.

View file

@ -100,8 +100,6 @@ sylius:
review:
author:
not_blank: Bitte geben Sie Ihre E-Mail-Adresse ein.
rating:
range: Bewertung muss eine Ganzzahl im Bereich 1-5 sein.
taxon_image:
file:
max_size: Das Bild ist zu groß - {{ size }}{{ suffix }}. Maximal zulässige Größe {{ limit }}{{ suffix }}.

View file

@ -126,7 +126,7 @@ sylius:
author:
not_blank: Please enter your email.
rating:
range: Review rating must be an integer in the range 1-5.
not_in_range: Review rating must be between {{ min }} and {{ max }}.
taxon_image:
file:
max_size: The image is too big - {{ size }}{{ suffix }}. Maximum allowed size is {{ limit }}{{ suffix }}.

View file

@ -90,8 +90,6 @@ sylius:
review:
author:
not_blank: Veuillez saisir votre adresse email.
rating:
range: La note de l'avis doit être un entier entre 1 et 5.
taxon_image:
file:
max_size: L'image est trop grande - {{ size }}{{ suffix }}. La taille maximum autorisée est de {{ limit }}{{ suffix }}.