-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Incorrect results of RangeAttribute #47434
Copy link
Copy link
Closed
Labels
✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Resolved because the question asked by the original author has been answered.Status: Resolvedarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesquestion
Metadata
Metadata
Assignees
Labels
✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Resolved because the question asked by the original author has been answered.Status: Resolvedarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesquestion
Type
Fields
Give feedbackNo fields configured for issues without a type.
Hello, I've encountered a strange behaviour of the RangeAttribute when attempting to set a negative value. Values between -0.5 and 0 are evaluated as valid.
Model:
Controller:
Results:
Value: -1, Result: False
Value: -0,6, Result: False
Value: -0,51, Result: False
Value: -0,5, Result: True
Value: -0,49, Result: True
Value: -0,4, Result: True
Value: -0,1, Result: True
Value: 0, Result: True