Updated component to throw exception on invalid tag id or attribute name