function ValidatorBuilder::addYamlMappings
Adds a list of YAML constraint mappings file to the validator.
Parameters
string[] $paths The paths to the mapping files:
Return value
$this
File
-
vendor/
symfony/ validator/ ValidatorBuilder.php, line 140
Class
- ValidatorBuilder
- @author Bernhard Schussek <bschussek@gmail.com>
Namespace
Symfony\Component\ValidatorCode
public function addYamlMappings(array $paths) : static {
if (null !== $this->metadataFactory) {
throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.');
}
$this->yamlMappings = array_merge($this->yamlMappings, $paths);
return $this;
}