Ticket: 150
This commit is contained in:
parent
171226d532
commit
a5a2751e29
1 changed files with 2 additions and 2 deletions
|
@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue