Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom validators, permission classes, and PermissionTestModel fo… #9567

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Ghosts6
Copy link

@Ghosts6 Ghosts6 commented Oct 19, 2024

This pull request introduces new custom validators, permission classes, and a test model 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 PermissionTestModel for permission test cases.

All changes have been tested, and all tests pass.

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