Commit 60a16eb6 by Vincent

Update validation.md

parent cdd9c6ea
......@@ -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');
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment