remove spaces before submit
Hi everyone !!
I try to modify a phone number to remove space before i send to the API. I get from a mui phone input. I have a state in which i store the phone number. When i submit i have a value like this
which i call in the on finish like this :
i also tried this :
but i always have the same issue which is :
My question is : How edit the phone number to remove the spaces before i submit it to the API ?
I try to modify a phone number to remove space before i send to the API. I get from a mui phone input. I have a state in which i store the phone number. When i submit i have a value like this
+33 6 10 20 30 40. I have made a function to remove the spaces like following :which i call in the on finish like this :
i also tried this :
but i always have the same issue which is :
edit.tsx:90 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'split') or replace in the other case. My question is : How edit the phone number to remove the spaces before i submit it to the API ?
