protected function validateValue($value, $definition)
    {
        try {
            return $definition->getValidator()->validate($value);
        } catch (\Exception $e) {
            throw new \Exception(sprintf('[%s] %s', $definition->getName(), $e->getMessage()));
        }
    }
protected function validateValue($value, $definition)
    {
        try {
            return $definition->getValidator()->validate($value);
        } catch (\Exception $e) {
            throw new \Exception(sprintf('[%s] %s', $definition->getName(), $e->getMessage()));
        }
    }
protected function validateValue ( $ value , $ definition ) { try { return $ definition -> getValidator ( ) -> validate ( $ value ) ; } catch ( \ Exception $ e ) { throw new \ Exception ( sprintf ( '[%s] %s' , $ definition -> getName ( ) , $ e -> getMessage ( ) ) ) ; } }
Run the value through the configured validator

@param mixed $value
@param Parameter $definition
@access protected

@throw Exception

@return mixed
Run the value through the configured validator