#29131: Make the error message for ArrayField more user and translation-friendly
--------------------------------------+------------------------------------
Reporter: Vlada Macek | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: contrib.postgres | Version: 2.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
--------------------------------------+------------------------------------
Comment (by Vlada Macek):
> Changing array to list might be okay, but what about all the messages in
the ArrayField model field that use "array".
Quickly peeking... I'd say this could be the only message observable by
the end user.
> About the addition of "(count from the left)"... I think that would be
better added in translational only for languages (if any?) where counting
in lists happens from the right?
I proposed such suboptimal wording rather to point out the non-technical
people might not be even prepared to count items from either side.
The resulting concatenated message for
`ArrayField(base_field=models.EmailField)` looks like this:
`<field name>: Item %(nth)s in the array did not validate: Enter valid
e-mail address`
Personally I'd expect the value itself to be mentioned:
`<field name>: One of the values in the list (%(value)s) did not validate:
Enter valid e-mail address`
> I guess the idea would be to modify
`contrib.postgres.utils.prefix_validation_error()` to add the space
instead.
Exactly what I found out.
Thank you.
--
Ticket URL: <https://code.djangoproject.com/ticket/29131#comment:2>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.622ad43fd770c9b356ce682bbc065c8e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.