Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@EachNotEmpty field does not indicate element that has failed #16

Open
mbyrne00 opened this issue Aug 2, 2015 · 0 comments
Open

@EachNotEmpty field does not indicate element that has failed #16

mbyrne00 opened this issue Aug 2, 2015 · 0 comments

Comments

@mbyrne00
Copy link

mbyrne00 commented Aug 2, 2015

Firstly thank you for your library and thank you for fixing issue 12.

Given I have a class

public class MyClass { @EachNotNull private Set<String> myCollection; }

When I use @EachNotNull and the first entry of the collection is a null value, then the field error correctly indicates that it's the first item that has an error: myCollection[0]

When I use @EachNotEmpty then the field reported as having the error is the collection field and not the entry: myCollection

For a collection with only one element it's trivial, but when you have multiple entries it's nice to be able to report which element had the problem.

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

No branches or pull requests

1 participant