form is taking and validating the data through  input