When validating an object, we cannot directly access the eachPrefix in the error message. Consequently, when we modify the error message, the value of eachPrefix always appears at the beginning of the message.
For example, if we change the validation message forIsNotEmpty to The The 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 in ValidationArguments.
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 forIsNotEmpty
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
.