fixed validator of input