Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ValidationResult.php
Go to the documentation of this file.
1 <?php
7 
17 {
21  private $errors = [];
22 
26  public function __construct(array $errors)
27  {
28  $this->errors = $errors;
29  }
30 
34  public function isValid(): bool
35  {
36  return empty($this->errors);
37  }
38 
42  public function getErrors(): array
43  {
44  return $this->errors;
45  }
46 }
$errors
Definition: overview.phtml:9