From 341bb7ede14293c6c5f060d4d95a3ab0c8af8fff Mon Sep 17 00:00:00 2001 From: Simon Winter Date: Wed, 14 Feb 2018 11:48:07 +1300 Subject: [PATCH] Update 09_Validation.md I believe that ValidationResult's error method is called, addError - and not error as stated in this file. --- docs/en/02_Developer_Guides/00_Model/09_Validation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/02_Developer_Guides/00_Model/09_Validation.md b/docs/en/02_Developer_Guides/00_Model/09_Validation.md index 6441b9631..c8605d7e0 100644 --- a/docs/en/02_Developer_Guides/00_Model/09_Validation.md +++ b/docs/en/02_Developer_Guides/00_Model/09_Validation.md @@ -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;