validates the iso8601 format
    raises value error if the value for fieldname does not match the format
    is iso8601 eg #"2007-06-20T12:34:40+03:00"

def validate_format_iso8601(validator, fieldname, value, format_option):
    """
    validates the iso8601 format
    raises value error if the value for fieldname does not match the format
    is iso8601 eg #"2007-06-20T12:34:40+03:00"
    """
    try:
        iso8601.parse_date(value)
    except ValueError:
        raise ValidationError(
            "Value %(value)r of field '%(fieldname)s' is not in "
            "'iso8601 YYYY-MM-DDThh:mm:ss(+/-)hh:mm' format" % locals())