question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to change all field to pristine after submit

See original GitHub issue

Versions:

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:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
logaretmcommented, May 25, 2017

@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.

0reactions
kkarthik14commented, May 11, 2021

@logaretm Still pristine and touched and untouched is not working with Select input type fields, is there any way to solve this issue,

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found