Added missing function, and fixed validateRule