it will validate the imput