ciscoheat / sveltekit-superforms

Making SvelteKit forms a pleasure to use!
https://superforms.rocks
MIT License
2.26k stars 65 forks source link

Constraints should defer from schema what step to use on inputs #496

Open alexbjorlig opened 3 weeks ago

alexbjorlig commented 3 weeks ago

Would be incredible, if we could defer from the schema, what value the constratins should have for step on input type=number.

https://github.com/user-attachments/assets/62e1a018-f31c-40cc-ab9b-894785f6ff27

Playground link: https://www.sveltelab.dev/ahyq3snzidrtlj8?files=.%2Fsrc%2Froutes%2Fschema.ts

ciscoheat commented 3 weeks ago

This is a great suggestion, but I'm putting it as a v3 feature, since it's been like this for a long time and may cause some surprises if the constraints are suddenly modified from one (minor) version update to another.