dinoperovic / django-salesman

Headless e-commerce framework for Django and Wagtail.
https://django-salesman.rtfd.io
BSD 3-Clause "New" or "Revised" License
391 stars 48 forks source link

Add a custom validator for "extra" field #1

Closed dinoperovic closed 4 years ago

dinoperovic commented 4 years ago

Is your feature request related to a problem? Please describe. User can populate extra field with any amount of JSON data using the API. It would be useful to allow a custom validator for extra field on basket and basket item serializer, similar to how address validation works on the checkout serializer.

Describe the solution you'd like Validate extra field before it gets saved on basket or basket item using a custom validator function configured in settings.py.

Describe alternatives you've considered -

Additional context -