Closed lmenzel closed 4 years ago
Register(Format)
method.I'm not going to make Format
a separate parameter on the Validate()
call. I probably need to make the JsonSchemaOptions
into an instance class an pass that around with the context. I can then put a format dictionary on the context as well. I'll consider the implications around this.
In the interest of unblocking you, I'm going to release v12.0.1 that is just a fix for overriding the format in its existing state.
Another thing I noticed is that unless you actually set Formats.Date
that property will hold onto the old format, though your override will be used because it registers in the constructor. This is all just wrong, and I need to rework it.
@lmenzel I've reworked how format validation works. This should allow you to override any format quite easily. Have a look at #268 to see the changes. I haven't done any docs on it yet.
Describe the bug
Expected behavior Invalid dates are rejected Overriding Formats replaces existing format validations
Idea It would be nice, if it was possible to override validations in a non-static way, e.g.