Reset Form
fidelman opened this issue · 1 comments
Hello guys,
Thank you very much for your library, it is awesome.
Is it possible to reset form after submitting and do not see validation messages?
For example,
I have form with 2 inputs (title is required and content is more than 5 symbols
After submitting, I run:
valid() {
this.publishArticle(this.state);
this.setState({
title: ''
content: ''
});
}
After state changing, validation works and shows validations messages. Is it possible to not show them?
Thanks a lot!
Hi @fidelman, I am glad that you like the library!
You can reset the form using $fieldEvent('reset')
. It is explained in detail here:
https://github.com/vacuumlabs/react-custom-validation#fieldeventevent-field-debounce
If you have any further questions, please let me know.