crdoconnor / strictyaml

Type-safe YAML parser and validator.
https://hitchdev.com/strictyaml/
MIT License
1.47k stars 60 forks source link

Add size validation to sequences? #106

Open chrisburr opened 4 years ago

chrisburr commented 4 years ago

Currently MapPattern has a minimum_keys and maximum_keys option. Do you have anything thoughts about adding a analogous minimum_size and maximum_size option to Seq and UniqSeq to allow validating their length?

I can prepare a PR if there are no objections.

crdoconnor commented 4 years ago

If it's something you personally want I'd say it is a good idea, yep.

On Tue, 9 Jun 2020, 15:25 Chris Burr, notifications@github.com wrote:

Currently MapPattern has a minimum_keys and maximum_keys option. Do you have anything thoughts about adding a analogous minimum_size and maximum_size option to Seq and UniqSeq to allow validating their length?

I can prepare a PR if there are no objections.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/crdoconnor/strictyaml/issues/106, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOJKNJGEAEYZKCW3GEN2OTRVZA6VANCNFSM4NZOU3YQ .