[fix] fix input validation