Skip to content

Commit 9a08efe

Browse files
agiulianoweaverryan
authored andcommitted
Added specification to Class Constraint Validator
1 parent e612fb5 commit 9a08efe

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cookbook/validation/custom_constraint.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,13 @@ With this, the validator ``isValid()`` method gets an object as its first argume
228228
}
229229
}
230230

231+
Note that Class Constraint Validator requires annotation is before class declaration::
232+
233+
/**
234+
* @AcmeAssert\ContainsAlphanumeric
235+
*/
236+
class AcmeEntity
237+
{
238+
// ...
239+
}
240+

0 commit comments

Comments
 (0)