Django Serializer Validator not working with allow_blank and read_only arguments

i have a serializer which has

some_field = CharField(allow_null=False, allow_blank=False, read_only=True)

The problem is that i do not get any errors if i try to serialize Serializer(data={'some_field': '').is_valid(raise_exception=True) or Null.

What am i doing wrong?

Back to Top