You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
both as field() argument and as @<field>.validator(...) decorator. Both can be specified in which case the arguments are used first.
if argument: a possibly ordered dictionary of <error_msg>: <validator>. For old python support, a list of key/val tuples is supported.
<validator> should be a callable accepting one, two or three arguments (val), (obj, val) or (obj, field, val) so that it has access to the full object on value modification (it can check values of other fields)
<validator> should return True or None in case of success (same definition than valid8)
when provided as a decorator, the error message is the argument of the decorator: @<field_name>.validator(<error message>)
The text was updated successfully, but these errors were encountered:
Spec:
field()
argument and as@<field>.validator(...)
decorator. Both can be specified in which case the arguments are used first.<error_msg>: <validator>
. For old python support, a list of key/val tuples is supported.<validator>
should be a callable accepting one, two or three arguments(val)
,(obj, val)
or(obj, field, val)
so that it has access to the full object on value modification (it can check values of other fields)<validator>
should returnTrue
orNone
in case of success (same definition thanvalid8
)@<field_name>.validator(<error message>)
The text was updated successfully, but these errors were encountered: