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
7 declare(strict_types=1);
8 
10 
13 
18 {
22  private $validators;
23 
27  public function __construct(array $validators)
28  {
29  $this->validators = $validators;
30  }
31 
35  public function validate(
37  ActionInterface $action
38  ): void {
39  foreach ($this->validators as $validator) {
40  $validator->validate($request, $action);
41  }
42  }
43 }
validate(RequestInterface $request, ActionInterface $action)