src/LaravelCommode/ValidationLocator/Locator/ValidationLocator.php
public function getValidator($alias)
    {
        if (array_key_exists($alias, $this->validators)) {
            $validator = $this->validators[$alias];
            return new $validator($this->translator, $this->presenceVerifier);
        }

        throw new \UnexpectedValueException("Unknown validator {$alias}");
    }
public function getValidator($alias)
    {
        if (array_key_exists($alias, $this->validators)) {
            $validator = $this->validators[$alias];
            return new $validator($this->translator, $this->presenceVerifier);
        }

        throw new \UnexpectedValueException("Unknown validator {$alias}");
    }
public function getValidator ( $ alias ) { if ( array_key_exists ( $ alias , $ this -> validators ) ) { $ validator = $ this -> validators [ $ alias ] ; return new $ validator ( $ this -> translator , $ this -> presenceVerifier ) ; } throw new \ UnexpectedValueException ( "Unknown validator {$alias}" ) ; }
Returns validator by it's alias.

If validator is registered under given alias
method will return new instance of validator,
otherwise it will throw an exception

@param string $alias Validator alias.
@throws \UnexpectedValueException
@return Validator
Returns validator by it s alias .