0

I want to have a few required input fields whose input needs to be a number. I then want to have a button which when clicked will show an error if a field is empty or doesn't contain a numeric input. If no such error exists then based on the input fields further processing should be done (this is defined in a function "submitButtonClicked").

My observation:
If I keep the button with type submit then input validation works but the page gets reloaded, I don't want the page to get reloaded. If the inputs are valid, "submitButtonClicked" should be called. I am working in React.

Harsha
  • 386
  • 1
  • 11

0 Answers0