convert type when validation happen