-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update validation schema to allow some keys to pass through and updat…
…e how it edits in admin form
- Loading branch information
Jon
committed
Sep 27, 2024
1 parent
71e9b9d
commit dd38f03
Showing
3 changed files
with
52 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from cerberus import Validator | ||
|
||
|
||
class OCSValidator(Validator): | ||
""" Custom validator that allows label, show(in UI), and description fields in the schema """ | ||
def _validate_description(self, constraint, field, value): | ||
pass | ||
|
||
def _validate_label(self, constraint, field, value): | ||
pass | ||
|
||
def _validate_show(self, constraint, field, value): | ||
pass |