Open Thorarin opened 4 years ago
Difficult to help without a demo.
If you want to re-validate all fields, use validateFields()
.
validateForm()
"validates only all non-dirty fields"
I guess you are using React classes. Follow this example: https://codepen.io/tkrotoff/pen/BRGdqL You should have:
<input onChange={handleChange} />
with handleChange
calling validateFields(target)
onSubmit={this.handleSubmit}
with handleSubmit
calling validateForm()
I'm seeing some unexpected behavior when I trigger validation on a button press:
The examples don't have this
reset()
call, so I'm wondering what could cause this type of behavior? I can't think of anything "special" I did in my form that would cause this.I'm using version 0.15.0.