Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed string formatting in the length validator #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fixed string formatting in the length validator #55

wants to merge 1 commit into from

Conversation

brukhabtu
Copy link

The length validator would return
'Value must be no more than %(max)d characters long'
without substituting min/max. Replacing with new style string formatting has fixed this.

The length validator would return 
'Value must be no more than %(max)d characters long'
without substituting min/max. Replacing with new style string formatting has fixed this.
@aconrad
Copy link
Contributor

aconrad commented Apr 15, 2014

Can you illustrate this problem a little more, I'm having a hard time understanding what the problem is exactly. Is this a scoping / closure issue with the namespace of the builtins min and max? If yes, why not change the function's params to be min_length and max_lenght?

I'm not against using format(), I'm just trying to understand how format fixes your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants