pablo-abc / felte

An extensible form library for Svelte, Solid and React
https://felte.dev
MIT License
1.01k stars 43 forks source link

How to prevent validation if form is not dirty? #289

Open ivanafanasyeu opened 5 months ago

ivanafanasyeu commented 5 months ago

Is your feature request related to a problem? Please describe. No validation strategy, If I switch via tab through inputs, you set aria-invalid, input wasn't even touched, but felte is already validating it. aria-invalid is great for me, but I'd like to not set it when input were not dirty.

Describe the solution you'd like I use yup add validation option (validator(schema, level, etc, validationType: "onChange" | "isDirty" | "etc"))

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

itsmingjie commented 5 months ago

May be related to #129, but it's been almost 2 years since that discussion 🥲

ivanafanasyeu commented 5 months ago

Related to https://github.com/pablo-abc/felte/issues/255