Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CompositeValidator.php
Go to the documentation of this file.
1 <?php
8 
13 {
17  private $validators;
18 
22  public function __construct(
23  array $validators = []
24  ) {
25  $this->validators = $validators;
26  }
27 
32  {
33  $errors = [];
34  foreach ($this->validators as $validator) {
35  $errors = array_merge($errors, $validator->validate($address));
36  }
37 
38  return $errors;
39  }
40 }
$address
Definition: customer.php:38
$errors
Definition: overview.phtml:9