def _validate(self, value): super(Geo, self)._validate(value) if len(value) != 2: schema.Invalid( 'Geo expects pair of values, {} values found: "{}"'.format( len(value), repr(value)), value, None) return value
def _validate(self, value, **kwargs): try: value = int(value) except TypeError: raise S.Invalid('%s is not int()-able' % value, value, None) value = datetime.utcfromtimestamp(value) return value
def _validate(self, value, **kw): if not self.regex.match(value): raise schema.Invalid('Not a valid email address', value) return value