Closed Ghosts6 closed 1 month ago
This pull request introduces new custom validators and permission classes to Django REST Framework:
AlphabeticFieldValidator
AlphanumericFieldValidator
CustomLengthValidator
IsAdminUserOrReadOnly
IsOwner
These changes enhance DRF’s flexibility in handling field validation and permissions. The code has been tested, and all tests pass.
This pull request introduces new custom validators and permission classes to Django REST Framework:
AlphabeticFieldValidator
to validate alphabetic characters and spaces.AlphanumericFieldValidator
to validate alphanumeric characters.CustomLengthValidator
to enforce string length limits.IsAdminUserOrReadOnly
permission class to allow only admin users to modify objects.IsOwner
permission class to allow object owners to edit their own objects.These changes enhance DRF’s flexibility in handling field validation and permissions. The code has been tested, and all tests pass.