tefra / xsdata-pydantic

Naive XML & JSON Bindings for python pydantic classes!
https://xsdata-pydantic.readthedocs.io/
MIT License
52 stars 10 forks source link

ADD pydantic restrictions #14

Open AfroMonkey opened 2 years ago

AfroMonkey commented 2 years ago

It would be great to be able to use the restrictions that pydantic Field offers, eg: min_items, max_items, regex; etc.

AfroMonkey commented 2 years ago

I'll try to do this via an intermediary class inherited from pydantic.dataclasses.dataclass; if it's successful, I'll share the code

craig8 commented 1 year ago

This would also be good for max_length validations. @AfroMonkey were you able to make this work?