Symfony\Component\Validator\ExecutionContextInterface::addViolationAt
Adds a violation at the validation graph node with the given property path relative to the current property path.
Signature
public function addViolationAt(string
$subPath,
[string
$message = null,
[array
$params = null,
[mixed
$invalidValue = null,
[integer|null
$pluralization = null,
[integer|null
$code = null]]]]] )
Parameters
$subPath
—
string
- The relative property path for the violation.
$message
—
string
- The error message.
$params
—
array
- The parameters substituted in the error message.
$invalidValue
—
mixed
- The invalid, validated value.
$pluralization
—
object
- The number to use to pluralize of the message.
$code
—
object
- The violation code.