Hi Ben,

>From a quick look, I'd suggest trying an approach similar to how form 
fields work, with a `default_error_messages` class attribute which can be 
override by an `error_messages` parameter provided to __init__().

Tim

On Thursday, December 17, 2015 at 5:46:04 PM UTC-5, Benjamin W Stookey 
wrote:
>
> Right now, if min or max validation doesn't pass on a fieldset, we provide 
> something 
> like the following error 
> <https://github.com/django/django/blob/master/django/forms/formsets.py#L340-L354>
> :
>
> Please submit 1 or more forms.
>
>
> I'd like to propose that we provide a way to generate a slightly more 
> specific error. For example:
>
> Please submit 1 or more authors.
>
>
> I'm eager to write the code to do this. There are a number of ways to 
> implement it so I figured it would need discussion first and a ticket 
> before I could issue a pull request. If people think this is a good idea, 
> I'll document a few potential approaches for discussion.
>
> A few options that come to mind before diving in.
>
>    - Adding a `verbose_name_plural` property to the formset
>    - Pulling the `verbose_name_plural` from the form class (if forms are 
>    model forms)
>
> Thanks,
> -Ben
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/36c0651c-ee0b-40fb-9c8d-42ccbdbcb90d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to