def check_dash_and_from(text):
    """Check the text."""
    err = "dates_times.dates"
    msg = u"When specifying a date range, write 'from X to Y'."

    regex = "[fF]rom \d+[^ \t\n\r\f\va-zA-Z0-9_\.]\d+"
    return existence_check(text, [regex], err, msg)
Check the text.