small update to validation docs
This commit is contained in:
parent
5f0b6cd1cd
commit
3e7d9d227e
@ -9,7 +9,13 @@ Once you enabled validation, you'll get a bunch of validations automatically:
|
|||||||
|
|
||||||
<code type="php">
|
<code type="php">
|
||||||
// turning on validation
|
// turning on validation
|
||||||
Doctrine_Manager::getInstance()->setAttribute(Doctrine::ATTR_VLD, true);
|
Doctrine_Manager::getInstance()->setAttribute(Doctrine::ATTR_VALIDATE, Doctrine::VALIDATE_ALL);
|
||||||
|
</code>
|
||||||
|
|
||||||
|
You can combine the following constants by using bitwise operations: VALIDATE_ALL, VALIDATE_TYPES, VALIDATE_LENGTHS,
|
||||||
|
VALIDATE_CONSTRAINTS, VALIDATE_NONE. For example to enbale all validations except length validations you would use:
|
||||||
|
<code>
|
||||||
|
VALIDATE_ALL & ~VALIDATE_LENGTHS
|
||||||
</code>
|
</code>
|
||||||
|
|
||||||
+++ More Validation
|
+++ More Validation
|
||||||
|
Loading…
x
Reference in New Issue
Block a user