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
Post a Comment