Python Schematics: How to do model level validation? -


i have python class following:

from schematics.models import model schematics.types import stringtype  class myclass(model):     some_string = stringtype()     other_string = stringtype() 

i'm trying make value of other_stringrequired if some_string == "hello". how write model level validator this?


note docs schematics model level validation right here, documentation doesn't mention purpose of data , value arguments. furthermore, don't elaborate how model level validation @ in entire documentation.


Comments

Popular posts from this blog

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -