#!/usr/bin/env python
from cerberus import Validator
v = Validator()
v.schema = {'name': { 'type': 'string', 'minlength': 25},
'age': {'type': 'integer', 'min': 18, 'max': 65}}
if v.validate({'name': 'codecaine', 'age': 4}):
print('valid data')
else:
print('invalid data')
print(v.errors)