[#384] add validator  to validate user input.