validates attachement