Skip to content
This repository has been archived by the owner on Dec 28, 2020. It is now read-only.

BeanValidation(JSR303)の検証順が一定でないことに対する対応策 #4

Open
ghost opened this issue Oct 4, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Oct 4, 2017

JSR303 bean validation.
struggling that show validation error messages to view.

@ghost ghost added the help wanted label Oct 9, 2017
@ghost
Copy link
Author

ghost commented Oct 15, 2017

https://github.com/bububu10/vaadin-ddd-demo/blob/8cbb99d3f0b2294f54f54ec8949691ca198ba4eb/demo-application/src/main/java/com/example/demo/domain/model/user/profile/UserId.java#L14-L18

https://github.com/bububu10/vaadin-ddd-demo/blob/8cbb99d3f0b2294f54f54ec8949691ca198ba4eb/demo-application/src/main/java/com/example/demo/domain/model/user/profile/UserName.java#L11-L14

https://github.com/bububu10/vaadin-ddd-demo/blob/8cbb99d3f0b2294f54f54ec8949691ca198ba4eb/demo-application/src/main/java/com/example/demo/domain/model/user/profile/EmailAddress.java#L10-L13

2017-10-15 12 27 54

本当は@NotEmptyの検証を最初に走らせて、そのエラーメッセージを画面に表示したい。
あるいはすべてのエラーメッセージを取得してそれを全て画面に表示したいが、
com.vaadin.data.BeanValidationBinder はランダムに検証 -> 制約違反があればそこでエラーを返す、みたいな動きをしている?

@ghost ghost changed the title how to validate field(which has multi JSR303 annotation) in order? BeanValidationの検証順が一定でないことに対する対応策 Oct 15, 2017
@ghost ghost changed the title BeanValidationの検証順が一定でないことに対する対応策 BeanValidation(JSR303)の検証順が一定でないことに対する対応策 Oct 15, 2017
@ghost
Copy link
Author

ghost commented Oct 15, 2017

https://vaadin.com/forum/#!/thread/16835947
フォーラムに投げてるけど反応がないので実装見た方がはやいかも。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

0 participants