Generates a Zod schema that validates and formats a phone number to E164 using libphonenumber-js.
Attempts to parse the provided value with an optional default country.
If the phone number is valid, the schema transforms the phone number into
an international format (e.g. +358401234567).
Generates a Zod schema that validates and formats a phone number to E164 using
libphonenumber-js
. Attempts to parse the provided value with an optional default country.If the phone number is valid, the schema transforms the phone number into an international format (e.g.
+358401234567
).