src/FilterClassMap.php
public function addValidator($name, $validator)
    {
        $name = (string) $name;
        if ($name === '') {
            throw new \InvalidArgumentException('$name cannot be empty');
        }

        $validator = (string) $validator;
        if ($validator === '') {
            throw new \InvalidArgumentException('$validator cannot be empty');
        }

        $this->validators[$name] = $validator;
    }
public function addValidator($name, $validator)
    {
        $name = (string) $name;
        if ($name === '') {
            throw new \InvalidArgumentException('$name cannot be empty');
        }

        $validator = (string) $validator;
        if ($validator === '') {
            throw new \InvalidArgumentException('$validator cannot be empty');
        }

        $this->validators[$name] = $validator;
    }
@param string $name
@param string $validator

@throws \InvalidArgumentException