-
Notifications
You must be signed in to change notification settings - Fork 0
in & not in
Majid Ahmaditabar edited this page Dec 10, 2021
·
2 revisions
- The field under validation must be included in the given list of values.
- The field under validation must not be included in the given list of values.
data = {
"north_america": "usa",
"europe": "italy",
"grade": "a",
}
rules = {
"north_america": ["required", "in:usa,canada"],
"europe": ["required", "not_in:china,japan"],
"grade": ["required", "in:a,b"],
}
validate = PyValidations.make(data, rules)