def reminder_validator(input_str):
    """
    Allows a string that matches utils.REMINDER_REGEX.
    Raises ValidationError otherwise.
    """
    match = re.match(REMINDER_REGEX, input_str)
    if match or input_str == '.':
        return input_str
    else:
        raise ValidationError('Expected format: <number><w|d|h|m> '
                              '<popup|email|sms>. (Ctrl-C to exit)\n')

    Allows a string that matches utils.REMINDER_REGEX.
    Raises ValidationError otherwise.
    
gcalcli/validators.py