fixed rule name error when validator object as rule
added test for unexpected rule type