Skip to content

Conversation

@Ghosts6
Copy link

@Ghosts6 Ghosts6 commented Oct 19, 2024

This pull request introduces new custom validators and permission classes to Django REST Framework:

  • Added AlphabeticFieldValidator to validate alphabetic characters and spaces.
  • Added AlphanumericFieldValidator to validate alphanumeric characters.
  • Added CustomLengthValidator to enforce string length limits.
  • Added IsAdminUserOrReadOnly permission class to allow only admin users to modify objects.
  • Added IsOwner permission class to allow object owners to edit their own objects.
  • Added test cases for all new validators and permissions.

These changes enhance DRF’s flexibility in handling field validation and permissions. The code has been tested, and all tests pass.

@Ghosts6 Ghosts6 closed this Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant