Reputation: 1432
I am trying to build a Registration Form using Material-UI and Reactjs.
In my code, the input validation and required
attribute seems to be not working for a <TextField />
component of Material-UI.
With a normal <input />
component, the validation is happening (see below pictures).
You can find my code in this sandbox:
Upvotes: 0
Views: 1367
Reputation: 970
A button
should have a type="submit"
attribute to specify that you are doing a form submission on the click of the button. In material-ui by default type="button"
. So you need to specify the type of the button to make it work. I have fixed it here
Upvotes: 2