how to change all field to pristine after submit
See original GitHub issueVersions:
VueJs: 2.1.3 Vee-Validate:2.0.0-beta.22
I want to make all fields clean and pristine after form submit and in angular this possible. How to do it in your plugin?
this.$validator.validateAll().then(success => {
if (success) {
this.$http.post('/calculator', result)
.then( this.fields.setPristine() )
.catch(console.log("чего-то не так"));
}
});
Issue Analytics
- State:
- Created 7 years ago
- Reactions:6
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Make all input field pristine after submitting once
I have an angular form, I want to mark all input fields pristine and submit button disabled after submitting once.
Read more >Final Form Docs – `FormState`
Pristine (since last submit) fields will not appear in this object. Note that this is a flat object, so if your field name...
Read more >Input controls remain dirty and not pristine after form.reset() in ...
When calling form.reset() after changing a controls value, I would expect the controls to be reset to dirty: false, pristine: true, touched: false....
Read more >FormGroup - Angular
A FormGroup aggregates the values of each child FormControl into one object, with each control name as the key. It calculates its status...
Read more >Initializing From State - Redux Form
Pass a enableReinitialize prop or reduxForm() config parameter set to true to allow the form the reinitialize with new "pristine" values every time...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Neve12ende12 I think I fixed this issue in the current branch, I will finish writing up the release notes and docs then tag a release.
@logaretm Still pristine and touched and untouched is not working with Select input type fields, is there any way to solve this issue,