fluent-validator icon indicating copy to clipboard operation
fluent-validator copied to clipboard

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

Open JoeXie opened this issue 7 years ago • 3 comments

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.

JoeXie avatar Apr 13 '18 01:04 JoeXie

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.

neoremind avatar May 27 '18 10:05 neoremind

@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.

JoeXie avatar Aug 02 '18 06:08 JoeXie

I will look into this issue.

neoremind avatar Aug 04 '18 04:08 neoremind