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

only first filed of car's tow same validator was validated #34

Open
JoeXie opened this issue Apr 13, 2018 · 3 comments
Open

only first filed of car's tow same validator was validated #34

JoeXie opened this issue Apr 13, 2018 · 3 comments

Comments

@JoeXie
Copy link

JoeXie commented Apr 13, 2018

FluentValidator.checkAll()
                .configure(new SimpleRegistry())
                .on(car)
                .doValidate(new SimpleValidateCallback());

class car may like this:

class car{
...
    @FluentValidate(SimpleDataValidator.class)
    private String startTime;

    @FluentValidate(SimpleDataValidator.class)
    private String endTime;
...
}

When I use this method, only first filed of car's tow same validator was validated, validator worked on startTime, ignored endTime.

@neoremind
Copy link
Owner

Sorry, I am a little busy recently, can you make sure which strategy is enabled? if failfast is enabled, only first error will be returned.

@JoeXie
Copy link
Author

JoeXie commented Aug 2, 2018

@neoremind
Yes, policy is FailFast. on the case of the first field is correct , the second field is wrong. But the framework didn't find the second wrong field and just ignored this field.

@neoremind
Copy link
Owner

I will look into this issue.

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

2 participants