'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?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source