from datetime import datetime


def date_validator(value: str) -> str:
    """
    Validate if string is a valid date

    Arguments:
        value {str} -- value to validate

    Returns:
        str -- validate date as string
    """

    try:
        return str(datetime.fromisoformat(value).date())
    except TypeError:
        raise ValueError("Can't convert value to date!")