def validate_slackpost(attr, value):
    """SlackPost input validator function."""
    if attr in ("channel", "credentials"):
        if not isinstance(value, str):
            raise InvalidMessageInputError("SlackPost", attr, value, "string")
    elif attr in ("attachments"):
        check_valid("SlackPost", attr, value, validus.isurl, "url")