added test for null as rules and messages value