mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #7867 from simonwinter/patch-2
Update validation in Developer guides
This commit is contained in:
commit
d33fbc6add
@ -37,7 +37,7 @@ class MyObject extends DataObject
|
||||
$result = parent::validate();
|
||||
|
||||
if($this->Country == 'DE' && $this->Postcode && strlen($this->Postcode) != 5) {
|
||||
$result->error('Need five digits for German postcodes');
|
||||
$result->addError('Need five digits for German postcodes');
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
Loading…
Reference in New Issue
Block a user