validate attribute names; closes #498