-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed as not planned
Description
Describe the problem
Recently, a company I work with gave us a sprint ticket to add trimming to all values submitted via a form throughout the whole project. It took us a lot of useful hours to track down and identify all the text inputs which needed to be trimmed before form submission.
A colleague of mine suggested to write a high order function that will iterate through the request body and trim out the values of type string.
Describe the proposed solution
This got me thinking to have a custom prop on svelte form elements that can automatically trim values on submit. A prop like autoTrim can be introduced on form tags that will automatically all values before passing invoking the onSubmit or action.
Importance
would make my life easier
Metadata
Metadata
Assignees
Labels
No labels