Raise errors for invalid rules