#18483: HiddenInput validation i18n trouble -------------------------------------+------------------------------------- Reporter: Evil Clay | Owner: nobody <clay.evil@…> | Status: new Type: Bug | Version: 1.4 Component: Forms | Resolution: Severity: Normal | Triage Stage: Accepted Keywords: | Needs documentation: 0 Has patch: 0 | Patch needs improvement: 0 Needs tests: 0 | UI/UX: 0 Easy pickings: 1 | -------------------------------------+------------------------------------- Changes (by aaugustin):
* needs_better_patch: => 0 * component: Uncategorized => Forms * needs_tests: => 0 * easy: 0 => 1 * needs_docs: => 0 * type: Cleanup/optimization => Bug * stage: Unreviewed => Accepted Comment: 1) If the default error string of django.forms.forms, line 152, is ever displayed to an end user, he has no way to fix his submission, since the error is on an hidden field. That said, we can translate this string — as a matter of principle. I'm accepting the ticket on the basis. 2) Generally speaking, there's no obvious way to display errors on hidden fields. The `form.as_xxx` methods display them as global errors, which is as good as a generic solution can be. If your form may have validation errors on hidden fields, you'd better write some appropriate code to explain how to fix them. Otherwise your form could be very hard to use! So I think Django's behavior is reasonable here. In my opinion it's best to avoid validation errors on hidden fields, rather than avoid the `form.as_xxx` methods :) -- Ticket URL: <https://code.djangoproject.com/ticket/18483#comment:1> 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 post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.