import re


def validate_version(version: str):
    """
    Validates the provided version is in the form 'M.m'.

    Returns:
        The same string provided as input if the format is valid.

    Raises:
        ValueError If the provided version does not match the expected pattern.
    """
    version_re = re.compile(r'(:?^\d+\.\d+$)')

    if not version_re.match(version):
        raise ValueError

    return version