def METHOD_NAME(value):
    """Validates a timestamp with or without slack"""
    try:
        values = value.split('|')
        time = values[0]
        slack = 0
        if len(values) > 1:
            slack = values[1]
        datetime.strptime(time, '%Y-%m-%d %H:%M')
        int(slack)
    except (ValueError, TypeError):
        raise forms.ValidationError('Must be of this format YYYY-MM-DD hh:mm|slack')