You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: the $value placeholder is not replaced in validation error messages #921
When triggered a validation error, the resulting error message with the variable $value shows the variable name instead of the actual value. Other ValidationError variables still work, like $property or $contraint1
Minimal code-snippet showcasing the problem
@Max(250,{message: '$property is too big. Maximum value is $constraint1, but actual is $value'})
limit: number=100;
Expected behavior
Show the actual value of $value and not its name.
Actual behavior
Instead of seeing the following validation error message:
"limit is too big. Maximum value is 250, but actual is 500"
I am seeing this:
"limit is too big. Maximum value is 250, but actual is $value"
changed the title [-]ValidationError - Value of $value is not shown in validation error message[/-][+]fix: the `$value` placeholder is not replaced in validation error messages[/+]on Dec 9, 2022
Activity
c0d3ster commentedon Sep 23, 2021
duplicated here: #1046
Has anyone dug into this one and found the issue? I'm experiencing this on validating a nested object input type
[-]ValidationError - Value of $value is not shown in validation error message[/-][+]fix: the `$value` placeholder is not replaced in validation error messages[/+]