Skip to content

Commit 503c07c

Browse files
a-astxabbuh
authored andcommitted
Fixed wrong code examples for Isbn constraint
1 parent e7246b6 commit 503c07c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

reference/constraints/Isbn.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ on an object that will contain an ISBN.
4848
{
4949
/**
5050
* @Assert\Isbn(
51-
* type = isbn10,
52-
* message: This value is not valid.
51+
* type = "isbn10",
52+
* message = "This value is not valid."
5353
* )
5454
*/
5555
protected $isbn;
@@ -99,7 +99,7 @@ on an object that will contain an ISBN.
9999
public static function loadValidatorMetadata(ClassMetadata $metadata)
100100
{
101101
$metadata->addPropertyConstraint('isbn', new Assert\Isbn(array(
102-
'type' => isbn10,
102+
'type' => 'isbn10',
103103
'message' => 'This value is not valid.'
104104
)));
105105
}

0 commit comments

Comments
 (0)