#35532: Allow customizing errors processing in 
BaseModelFormSet.validate_unique()
--------------------------------------------+------------------------
               Reporter:  Christophe Henry  |          Owner:  nobody
                   Type:  New feature       |         Status:  new
              Component:  Forms             |        Version:  5.0
               Severity:  Normal            |       Keywords:
           Triage Stage:  Unreviewed        |      Has patch:  1
    Needs documentation:  0                 |    Needs tests:  0
Patch needs improvement:  0                 |  Easy pickings:  0
                  UI/UX:  0                 |
--------------------------------------------+------------------------
 `BaseModelFormSet.validate_unique()`
 [https://github.com/django/django/blob/main/django/forms/models.py#L850-L853
 doesn't offer a way to customize errors] for instance to provide a more
 specific message or add the error message to a specific field.

 I propose to fix this problem by adding two `process_unique_error` and
 `process_date_error` that get the form, fields and values as parameters.

 Please check the enclosed patch for proposed solution.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35532>
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/010701902bc47722-7610e591-8e77-47c8-8be7-b3a9e81b1669-000000%40eu-central-1.amazonses.com.

Reply via email to