You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into a scenario where I would like to use a masked field for the phone number value but when the form submits the phone number it is in masked format and not just the digits. I think the masked part should be a UI thing and the value sent in submission should not be masked.
current behavior: value is still masked when sent to the DB "(321) 123-1232" proposed behavior: value is only masked in the UI and is just numeric when submitted like "3211231232"
@hvilander I think for most we would want to remove the mask. The ones I think need the mask removed when submitting are phone, zip, currency, percent, and ssn. I think leaving the email mask and date mask is fine.
If `stripNonNumeric` is true it will, on change, set the field's value
to the current input value with all non-numeric characters removed
✅ Closes: #224
I ran into a scenario where I would like to use a masked field for the phone number value but when the form submits the phone number it is in masked format and not just the digits. I think the masked part should be a UI thing and the value sent in submission should not be masked.
current behavior: value is still masked when sent to the DB "(321) 123-1232"
proposed behavior: value is only masked in the UI and is just numeric when submitted like "3211231232"
Here is what a screen shot of the masked value being submitted in our Storybook

http://localhost:6006/?path=/story/forms-sqform--basic-form-with-masked-fields
Current workaround is to strip the non-numeric values when handling the submit
The text was updated successfully, but these errors were encountered: