Skip to content

Commit 2e23223

Browse files
new setting for IDEa , I did one simple addition and deleted it just to create new PR no more .
1 parent 0892f93 commit 2e23223

File tree

3 files changed

+65
-60
lines changed

3 files changed

+65
-60
lines changed

src/main/java/ru/mystamps/web/feature/series/sale/AddSeriesSalesForm.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.hibernate.validator.constraints.URL;
2323
import org.springframework.format.annotation.DateTimeFormat;
2424
import ru.mystamps.web.dao.dto.Currency;
25+
import ru.mystamps.web.support.beanvalidation.FieldsMismatch;
2526
import ru.mystamps.web.support.beanvalidation.Group;
2627
import ru.mystamps.web.validation.ValidationRules;
2728

@@ -31,8 +32,10 @@
3132
import java.math.BigDecimal;
3233
import java.util.Date;
3334

35+
// @todo #503 Add integration test to ensure that seller and buyer are different
3436
@Getter
3537
@Setter
38+
@FieldsMismatch(first = "sellerId", second = "buyerId", message = "{seller.buyer.match}")
3639
public class AddSeriesSalesForm implements AddSeriesSalesDto {
3740

3841
@DateTimeFormat(pattern = "dd.MM.yyyy")

src/main/resources/ru/mystamps/i18n/ValidationMessages.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ login.repetition_chars = Login must not contain repetition of hyphen, dot or und
4848

4949
password.mismatch = Password mismatch
5050
password.login.match = Password and login must be different
51+
seller.buyer.match = Seller and buyer must be different
5152

5253
name.invalid = Name must consist only letters, hyphen or spaces
5354

0 commit comments

Comments
 (0)