Option for automatically resetting validators #907
Closedoscartbeaumont(GitHub profile, opens in a new tab)wants to merge 8 commits into
main fromrefs/pull/907/headopened - packages/form-core/src/FormApi.ts lines 165 to 172@@ -160,3 +160,13 @@160160 formApi: FormApi<TFormData, TFormValidator>161161 }) => void162162 transform?: FormTransform<TFormData, TFormValidator>163+ /**164+ * When true, all previous validation errors will be cleared when running validation.165+ *166+ * While `true`:167+ * - `onMount` and `onBlur` errors will be cleared when `onChange` triggers validation.168+ *169+ * While `false`:170+ * - An `onMount` error will never be cleared.171+ * - An `onBlur` error will only be cleared on the next `onBlur` event.172+ * - An `onChange` error will only be cleared on the next `onChange` event.packages/form-core/src/FormApi.ts line 176@@ -160,3 +160,17 @@160160 formApi: FormApi<TFormData, TFormValidator>161161 }) => void162162 transform?: FormTransform<TFormData, TFormValidator>163+ /**164+ * When true, all previous validation errors will be cleared when running validation.165+ *166+ * While `true`:167+ * - `onMount` and `onBlur` errors will be cleared when `onChange` triggers validation.168+ *169+ * While `false`:170+ * - An `onMount` error will never be cleared.171+ * - An `onBlur` error will only be cleared on the next `onBlur` event.172+ * - An `onChange` error will only be cleared on the next `onChange` event.173+ *174+ * @default false175+ */176+ automaticallyResetValidators?: boolean
Balastrong(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
☁️ Nx Cloud Report#
CI is running/has finished running commands for commit eb01133c815d69e8b2b303f21761fa75c6b5f960. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.
📂 See all runs for this CI Pipeline Execution
✅ Successfully ran 2 targets
nx affected --targets=test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build --parallel=3nx run-many --target=build --exclude=examples/**Sent with 💌 from NxCloud.