Merge pull request #7867 from simonwinter/patch-2

Update validation in Developer guides
This commit is contained in:
Loz Calver 2018-02-14 09:18:26 +00:00 committed by GitHub
commit d33fbc6add
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,7 +37,7 @@ class MyObject extends DataObject
$result = parent::validate(); $result = parent::validate();
if($this->Country == 'DE' && $this->Postcode && strlen($this->Postcode) != 5) { 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; return $result;