Commit a5a2751e authored by romanb's avatar romanb

parent 171226d5
......@@ -18,8 +18,8 @@ class Email extends Doctrine_Record {
}
protected function validate() {
if ($this->address !== 'the-only-allowed-mail@address.com') {
// syntax: add(<fieldName>, <error identifier>)
$this->errorStack->add('address', 'myCustomValidationTypeError');
// syntax: add(<fieldName>, <error code>)
$this->errorStack->add('address', 'myCustomErrorCode');
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment