public function isTrue($condition, Blueprint $sourceBlueprint=null)
    {
        // resolve placeholders
        $condition = $this->valueResolver->resolvePlaceholders($condition, $sourceBlueprint, 'conditional_value', $condition);

        if ($condition == 'default') {
            return true;
        }
        if (strpos($condition, '==') !== false) {
            list($left, $right) = explode('==', $condition, 2);
            $left = trim($left);
            $right = trim($right);
            return ($left == $right);
        } elseif (strpos($condition, '!=') !== false) {
            list($left, $right) = explode('!=', $condition, 2);
            $left = trim($left);
            $right = trim($right);
            return ($left != $right);
        } elseif (strpos($condition, '~=') !== false) {
            list($subject, $pattern) = explode('~=', $condition, 2);
            $subject = trim($subject);
            $pattern = trim($pattern);
            return preg_match($pattern, $subject);
        }
        throw new \Exception('Invalid condition: ' . $condition);
    }