dynamic patch valhook according input type #429 #372
Add value validating
fix conflicts