react-phone-input-2
react-phone-input-2 copied to clipboard
Default value and validation
So I am struggling a bit with the field properties after I completed the custom CSS. Firstly, Is there a way to set a default value as phone number, I tried it with
inputProps={{ value:
+${phone}, }}
Which did work, but it removed the formatting per country, which removed the () and spaces.
And secondly, is there any way to validate the PhoneInput value in a formik
? And what are the default validations used, since I believe there are some, but they never get triggered, or are there no default validations?
I would like to know those 2 things since then this would be the perfect phone input.
Thanks in advance!