json-schema-org / JSON-Schema-Test-Suite

A language agnostic test suite for the JSON Schema specifications
MIT License
625 stars 209 forks source link

Add a test case for ipv4 with netmask #690

Closed skryukov closed 1 year ago

skryukov commented 1 year ago

This PR adds a case to test that ipv4 format validation fails for address with a netmask. We already have such test case for ipv6, so why not add one for ipv4 😅

Spec reference:

A string instance is valid against this attribute if it is a valid representation of an IPv4 address according to the "dotted-quad" ABNF syntax as defined in RFC 2673, section 3.2 [RFC2673].

https://json-schema.org/draft-04/draft-fge-json-schema-validation-00#rfc.section.7.3.4.2

Julian commented 1 year ago

Thanks! Makes sense (and appreciate you including the link to the spec!)