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

fix: add client-side validation for @PastOrPresent and @FutureOrPresent #8684

Merged
merged 2 commits into from
Jul 6, 2020

Commits on Jul 6, 2020

  1. fix: add client-side validation for @PastOrPresent and @FutureOrPresent

    Client-side validators interpret 'present' as 'within one second of _now_'.
    
    NOTE: JSR-380 server-side validators interpret 'present' depending on the Java property type (could be the whole current year for `java.time.Year` (see https://beanvalidation.org/2.0-jsr380/spec/#builtinconstraints-pastorpresent)
    Viktor Lukashov committed Jul 6, 2020
    Configuration menu
    Copy the full SHA
    15ae925 View commit details
    Browse the repository at this point in the history
  2. remove unsupported client-side validators: @PastOrPresent and @Future…

    …OrPresent
    
    It's not trivial to ensure the same granularity of _present_ as on the server-side: year / month / day / minute.
    Until there is a sensible client-side implementation that works close enough to the server-side, it's better not to have any client-side validation for these constraints than to have a broken implementaiton.
    Viktor Lukashov committed Jul 6, 2020
    Configuration menu
    Copy the full SHA
    0793bfc View commit details
    Browse the repository at this point in the history