From cdd9c6ead8b2c455c5da20a5e6215582baca5d59 Mon Sep 17 00:00:00 2001 From: Vincent Date: Fri, 17 Jan 2014 18:29:34 +0100 Subject: [PATCH 1/2] Corrected an error in the inline validator doc --- docs/guide/validation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/validation.md b/docs/guide/validation.md index 66637c8..1784606 100644 --- a/docs/guide/validation.md +++ b/docs/guide/validation.md @@ -119,7 +119,7 @@ needs to be divisible by 10. In the rules you would define: `['attributeName', ' Then, your own method could look like this: ```php public function myValidationMethod($attribute) { - if(($attribute % 10) != 0) { + if(($this->attributeName % 10) != 0) { $this->addError($attribute, 'cannot divide value by 10'); } } From 60a16eb63150cf33d402ad8025f4bb7e13abf81e Mon Sep 17 00:00:00 2001 From: Vincent Date: Fri, 17 Jan 2014 19:25:03 +0100 Subject: [PATCH 2/2] Update validation.md --- docs/guide/validation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/validation.md b/docs/guide/validation.md index 1784606..f3bfd6b 100644 --- a/docs/guide/validation.md +++ b/docs/guide/validation.md @@ -119,7 +119,7 @@ needs to be divisible by 10. In the rules you would define: `['attributeName', ' Then, your own method could look like this: ```php public function myValidationMethod($attribute) { - if(($this->attributeName % 10) != 0) { + if(($this->$attribute % 10) != 0) { $this->addError($attribute, 'cannot divide value by 10'); } }