def stringValidator(prop, value):
    lowerValue = value.lower()
stripped = 'bla'
if stripped != lowerValue:
    raise datastore_errors.BadValueError(prop._name)
return stripped


class Foo(ndb.Model):
    pass
Поля реквизита валидатора NDB