diff options
Diffstat (limited to 'tests/modeltests/validation/models.py')
| -rw-r--r-- | tests/modeltests/validation/models.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/modeltests/validation/models.py b/tests/modeltests/validation/models.py index a9a3d3f485..b31f981aac 100644 --- a/tests/modeltests/validation/models.py +++ b/tests/modeltests/validation/models.py @@ -1,5 +1,5 @@ """ -30. Validation +31. Validation This is an experimental feature! @@ -146,4 +146,8 @@ u'john@example.com' >>> p.validate() {'email': ['Enter a valid e-mail address.']} +# Make sure that Date and DateTime return validation errors and don't raise Python errors. +>>> Person(name='John Doe', is_child=True, email='abc@def.com').validate() +{'favorite_moment': ['This field is required.'], 'birthdate': ['This field is required.']} + """} |
