Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

asp.net core rc2 stringlengh attribute with localization #4864

Closed
NGancevich opened this issue Jun 14, 2016 · 6 comments
Closed

asp.net core rc2 stringlengh attribute with localization #4864

NGancevich opened this issue Jun 14, 2016 · 6 comments
Assignees
Labels
3 - Done bug up-for-grabs Members of our awesome commnity can handle this issue

Comments

@NGancevich
Copy link

One more possible bug

[StringLength(100, ErrorMessage = "The Password must be at least {2} characters long.", MinimumLength = 6)]

On the interface I got

The Password must be at least 100 characters long.
but should be 6 characters long instead

Value in resx file:
The Password must be at least {2} characters long.

@dougbu
Copy link
Member

dougbu commented Jun 14, 2016

Thanks @NGancevich

Parameters are in the wrong order in the StringLengthAttributeAdapter.

@Eilon Eilon added this to the 1.0.1 milestone Jun 15, 2016
@Eilon Eilon added bug 1 - Ready up-for-grabs Members of our awesome commnity can handle this issue labels Jun 15, 2016
cjqian pushed a commit that referenced this issue Jun 27, 2016
Changed min/max parameter order in StringLengthAttributeAdapter. This fixes #4864.
@cjqian cjqian added 3 - Done and removed 1 - Ready labels Jun 27, 2016
@cjqian
Copy link
Contributor

cjqian commented Jun 27, 2016

c319ae5

@pranavkm
Copy link
Contributor

Do we need a breaking change announcement for this?

@dougbu
Copy link
Member

dougbu commented Jun 27, 2016

Do we need a breaking change announcement for this?

No.

@NGancevich
Copy link
Author

I have updated to asp.net core RTM (net46) but issue still exist. Parameter {2} is still maxlength but ought to be minlength.

@dougbu
Copy link
Member

dougbu commented Jun 28, 2016

@NGancevich fix is in next release, not 1.0.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3 - Done bug up-for-grabs Members of our awesome commnity can handle this issue
Projects
None yet
Development

No branches or pull requests

5 participants