Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ValidationComposite.php
Go to the documentation of this file.
1 <?php
7 
9 
16 {
20  private $rules;
21 
27  public function __construct(array $rules)
28  {
29  $this->rules = $rules;
30  }
31 
35  public function validate(Schema $schema)
36  {
37  $errors = [];
38 
39  foreach ($this->rules as $rule) {
40  $errors = array_replace_recursive(
41  $errors,
42  $rule->validate($schema)
43  );
44  }
45 
46  return $errors;
47  }
48 }
$errors
Definition: overview.phtml:9