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

php - Autoloader issue not returning Class -

java - How to put two numbers separated by a space into two different arrays -

laravel - Undefined property: Illuminate\Pagination\LengthAwarePaginator::$id (View: F:\project\resources\views\admin\carousels\index.blade.php) -