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

Closes #14279: Pass current request to custom validators #15491

Merged
merged 3 commits into from
Mar 22, 2024

Conversation

jeremystretch
Copy link
Member

Fixes: #14279

  • Move run_validators() to extras.signals
  • Extend run_validators() to pass the current request when running a validator
  • Extend the __call__() method on CustomValidator to accept and process a request in addition to an instance
  • Add a test for request validation

@jeremystretch jeremystretch added this to the v4.0 milestone Mar 20, 2024
netbox/extras/signals.py Show resolved Hide resolved
@jeremystretch jeremystretch merged commit 78b4fa5 into feature Mar 22, 2024
6 checks passed
@jeremystretch jeremystretch deleted the 14279-validator-request-context branch March 22, 2024 01:19
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants