@@ -54,14 +54,14 @@ |
||
| 54 | 54 | |
| 55 | 55 | public function validation() |
| 56 | 56 | { |
| 57 | - $validator = new Validation(); |
|
| 58 | - $validator->add('slug', new UniquenessValidator( |
|
| 59 | - [ |
|
| 60 | - "model" => $this, |
|
| 61 | - "message" => $this->getDi()->get('helper')->translate("Page with slug is already exists") |
|
| 62 | - ] |
|
| 63 | - )); |
|
| 64 | - return $this->validate($validator); |
|
| 57 | + $validator = new Validation(); |
|
| 58 | + $validator->add('slug', new UniquenessValidator( |
|
| 59 | + [ |
|
| 60 | + "model" => $this, |
|
| 61 | + "message" => $this->getDi()->get('helper')->translate("Page with slug is already exists") |
|
| 62 | + ] |
|
| 63 | + )); |
|
| 64 | + return $this->validate($validator); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | public static function findCachedBySlug($slug) |
@@ -62,14 +62,14 @@ |
||
| 62 | 62 | |
| 63 | 63 | public function validation() |
| 64 | 64 | { |
| 65 | - $validator = new Validation(); |
|
| 66 | - $validator->add('slug', new UniquenessValidator( |
|
| 67 | - [ |
|
| 68 | - "model" => $this, |
|
| 69 | - "message" => $this->getDi()->get('helper')->translate("Publishcation with slug is already exists") |
|
| 70 | - ] |
|
| 71 | - )); |
|
| 72 | - return $this->validate($validator); |
|
| 65 | + $validator = new Validation(); |
|
| 66 | + $validator->add('slug', new UniquenessValidator( |
|
| 67 | + [ |
|
| 68 | + "model" => $this, |
|
| 69 | + "message" => $this->getDi()->get('helper')->translate("Publishcation with slug is already exists") |
|
| 70 | + ] |
|
| 71 | + )); |
|
| 72 | + return $this->validate($validator); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | public function afterValidation() |