#34244 closed New feature (wontfix)

Allow overriding error params in BaseValidator

Reported by: Mateusz Kurowski Owned by: nobody
Component: Core (Other) Version: dev
Severity: Normal Keywords: validators, BaseValidator, params, error, override
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hello. I wonder if that is a valid change i suggest: Right now params are hardcoded, see:

https://github.com/django/django/blob/8cf3831822b708270f38fabb630bbdfdfbb41be1/django/core/validators.py#L367

It would be nice to call self.get_error_params - we could override this method.

What do you think?

Change History (2)

comment:1 by Mateusz Kurowski, 21 months ago

Summary: allow overriding error params in BaseValidatorAllow overriding error params in BaseValidator

comment:2 by Mariusz Felisiak, 21 months ago

Resolution: wontfix
Status: newclosed

BaseValidator is a private API used only for the min-max validators, it's also quite small, so IMO it's not worth additional complexity.

You can start a discussion on DevelopersMailingList, if you don't agree. Also, please follow triaging guidelines with regards to wontfix tickets.

Note: See TracTickets for help on using tickets.
Back to Top