You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I actually considered writing this as part of my earlier javax.validation contributions, but I don't think it's actually possible for v4 schema. I'm not exactly an expert on JSON schema, so if I've missed something, or someone knows how to do this, please do chime in.
Neither JSON nor the json-schema-validation draft spec contain a first-class type for date/time, This means that you get to use either a numeric value (think epochal timestamp) or a string. The validation spec does contain defined formats for dates and times as strings, but that doesn't really help us because a @Future annotation concerns the value of the field.
Without first class support for date/time you can't really do something like "is X after <some date/time>" because you have no way to make the comparison. And even if you could somehow compare it, there's no concept of "now" to compare it to.
The
@Future
annotation does't seem to have any effect on the json schema.The generate schema looks like
Is there any other way to enforce date validation?
The text was updated successfully, but these errors were encountered: