Custom validators, referencing custom fields and folders #8950
-
Been experimenting with custom validators and I got two questions:
|
Beta Was this translation helpful? Give feedback.
Answered by
jeremystretch
Mar 23, 2022
Replies: 1 comment 7 replies
-
I don't think it's possible using the bare rules approach, but you should be able to do this by creating a
Custom validator classes can be defined anywhere within the Python path. They just need to be importable within Hope that helps! |
Beta Was this translation helpful? Give feedback.
7 replies
Answer selected by
AndMrzv
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't think it's possible using the bare rules approach, but you should be able to do this by creating a
CustomValidator
class. Custom fields can be accessed asinstance.cf.foo
. (Still, it's probably worth an FR to enable custom field access using bare rules.)Custom validator classes can be defined anywhere within the Python path. They just need to be importable within
configuration.py
for assignment under theCUSTOM_VALIDATORS
confi…