sunlightlabs/validictory — pull request #51 by aconrad (2013-05-27 11:29:48+00:00)
Title: support email format validator

Before:

```python
>>> import validictory
>>> validictory.validate("foo", {"type":"string", "format":"email"})
>>>
```

After:

```python
>>> import validictory
>>> validictory.validate("foo", {"type":"string", "format":"email"})
Traceback (most recent call last):
File "", line 1, in
File "validictory/__init__.py", line 31, in validate
return v.validate(data, schema)
File "validictory/validator.py", line 574, in validate
self._validate(data, schema)
File "validictory/validator.py", line 577, in _validate
self.__validate("_data", {"_data": data}, schema)
File "validictory/validator.py", line 608, in __validate
newschema.get(schemaprop))
File "validictory/validator.py", line 470, in validate_format
format_validator(self, fieldname, value, format_option)
File "validictory/validator.py", line 91, in validate_format_email
"not an email" % locals(), fieldname, value)
validictory.validator.FieldValidationError: Value 'foo' of field '_data' is not an email
>>>
```