adding content type validator to attachment model