Stranger6667 / jsonschema-rs

JSON Schema validation library
https://docs.rs/jsonschema
MIT License
482 stars 90 forks source link

Is it expected that email validation is a bit incomplete? #471

Open qrilka opened 3 months ago

qrilka commented 3 months ago

In https://github.com/Stranger6667/jsonschema-rs/blob/79e35a2012e49ee7af58c6f8b9b10ff2ff0b0dff/jsonschema/src/keywords/format.rs#L122-L140 I see that email validation doesn't check for non-printable characters and explicitly says that domain validation is not done

Stranger6667 commented 2 months ago

That is deliberately simplistic, but I am open to extending it. From the spec:

When the implementation is configured for assertion behavior, it: SHOULD provide an implementation-specific best effort validation for each format attribute defined below; MAY choose to implement validation of any or all format attributes as a no-op by always producing a validation result of true;