Skip to content

Commit b3688d4

Browse files
committed
added misssing method parameter
1 parent d730798 commit b3688d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cookbook/validation/custom_constraint.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The validator class is also simple, and only has one required method: ``isValid`
6161
public function isValid($value, Constraint $constraint)
6262
{
6363
if (!preg_match('/^[a-zA-Za0-9]+$/', $value, $matches)) {
64-
$this->setMessage($constraint->message);
64+
$this->setMessage($constraint->message, array('%string%' => $value);
6565

6666
return false;
6767
}

0 commit comments

Comments
 (0)