fix AddAttachment validation