feature: accsess eachPrefix in error messages #2461
Labels
flag: needs discussion
Issues which needs discussion before implementation.
type: feature
Issues related to new features.
Description
When validating an object, we cannot directly access the
eachPrefix
in the error message. Consequently, when we modify the error message, the value ofeachPrefix
always appears at the beginning of the message.For example, if we change the validation message for
IsNotEmpty
to TheThe value of field $property should not be empty.
, the resulting output will be:eachPrefix The value of field $property should not be empty.
But the truth is that it should be like this:The value of field $eachPrefix.$property should not be empty.
Proposed solution
Accsess to
eachPrefix
like$property
or inValidationArguments
.The text was updated successfully, but these errors were encountered: