#33591: Incorrect validation message
-------------------------------------+-------------------------------------
Reporter: Maria Sorokina | Owner: nobody
Type: Bug | Status: closed
Component: Forms | Version: 4.0
Severity: Normal | Resolution: invalid
Keywords: ValidationError, | Triage Stage:
validation, message | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mariusz Felisiak):
> Thank you for your reply! Even in spite of your comment a couple of
things still confuse me:
>
> 1. I understood the part about overriding model validation with form
validation. What I cannot understand is why would I get an error message
"Enter a whole number" when I enter the whole number. I understand that
this is a default message but it doesn't make much sense to me.
Because you manually raised a `ValidationError` in `clean()` with
`code=invalid`, the error message for this exception has been replaced (as
documented) with the invalid's error message defined in
`forms.IntegerField`. If you're having trouble understanding how Django
works, see TicketClosingReasons/UseSupportChannels for ways to get help.
--
Ticket URL: <https://code.djangoproject.com/ticket/33591#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107017fabd27c8e-5675b605-5247-41c0-8821-fbf07593cdfc-000000%40eu-central-1.amazonses.com.