Fixed [type=date][max] rule, and add test cases.