apistar
apistar copied to clipboard
Support user defined formatters for validators
Expose formatters on validators allowing the use of custom formatters as opposed to just the hard-coded date / datetime formats currently available.
This allows a validator to serialize from a json value to any native type and back again, so long as it is defined on the formatter. The motivation behind this was initially to enable porting DRF's PrimaryKeyRelatedField and SlugRelatedField to APIStar to better enable ORM support for 3rd party libraries