1👍
✅
If you look at the Field Class you will notice it does not take ‘validators’, but CharField
, IntegerField
etc does.
Try:
serializers.CharField(validators=[character_validator])
Source:stackexchange.com