django-autocomplete-light
django-autocomplete-light copied to clipboard
Add the option to validate the field when creating a new choice
Add the option of validating the data when creating a new option.
Result in the example if we try to create a new option with the added validate_slug
@python_2_unicode_compatible
class TModel(models.Model):
name = models.CharField(
max_length=200,
validators = [validate_slug]
)

Superb! But are you sure we don't want to have validate_create enabled by default?
I didn't feel like I was the one to make that decision as this isn't my projet ;)
If you want it enabled by default I could change my PR to have an option to disable it or no option at all and enabled all the time.
what to you think ?
I think enable it by default, we want secure by default, we'll do a medium version number bump and a CHANGELOG entry
Released in 3.9.5-rc1 !
Thank you <3
Will enable by default in next major release