diff options
Diffstat (limited to 'tests/model_forms/models.py')
| -rw-r--r-- | tests/model_forms/models.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/model_forms/models.py b/tests/model_forms/models.py index 8936a17fc0..d54cccfe80 100644 --- a/tests/model_forms/models.py +++ b/tests/model_forms/models.py @@ -386,6 +386,8 @@ class CustomErrorMessage(models.Model): def clean(self): if self.name1 == 'FORBIDDEN_VALUE': raise ValidationError({'name1': [ValidationError('Model.clean() error messages.')]}) + elif self.name1 == 'FORBIDDEN_VALUE2': + raise ValidationError({'name1': 'Model.clean() error messages (simpler syntax).'}) elif self.name1 == 'GLOBAL_ERROR': raise ValidationError("Global error message.") |
