Skip to content

Preserving form state on validation errors only? #1183

Answered by ragulka
ragulka asked this question in Help (Vue)
Discussion options

You must be logged in to vote

Looks like this is totally possible! I can't believe I missed this when reading the docs:

preserveState: (page) => Object.keys(page.props.errors).length > 0

However, there is an undocumented (only documented in changelog) shortcut:

preserveState: "errors"

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@LucaRed
Comment options

Answer selected by ragulka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants