django-adapters
django-adapters copied to clipboard
Prototype validation tree
Create a prototype of the validation tree, allowing similar chaining of validation/cleaning functions similar to what Naval can do (see #21).
Here is a list of what should be possible:
- field validation (e.g.: username must not contain special characters)
- field "cleaning" (e.g.: unicode-normalize username)
- cross field validation (e.g.: email must contain username)
- specifying dependencies (e.g. first normalize username, then check for special chars)
It would also be nice to be able to continue the validation as far as possible even if one step failed, e.g. if the username contained special characters, the date of birth should still be checked.
To make all of this possible I think using a DAG (Directed Acyclic Graph) is the way to go, compared to Naval's more naive list of validators.
I think Naval's list of validators can be turned into a DAG without much difficulty, so that might still be a good UI for it.