here is my code
class CustomUser(BaseModel, AbstractUser):
type = models.CharField(choices=TYPES, max_length=20,
default='super_admin',error_messages={"null":'Value is not a
valid.',"blank":'Value is not a valid.',"invalid_choice":'Value is not a
valid.'})
note: Base model inherited from models.Model
--
Ticket URL: <https://code.djangoproject.com/ticket/33016>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by suneethdev):
Sorry, I have fixed the issue in serializer like this,
extra_kwargs = {"type": {"error_messages": {"null": "Value cannot be
null"}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33016#comment:1>
* status: new => closed
* resolution: => fixed
--
Ticket URL: <https://code.djangoproject.com/ticket/33016#comment:2>
* resolution: fixed => invalid
--
Ticket URL: <https://code.djangoproject.com/ticket/33016#comment:3>