-
Notifications
You must be signed in to change notification settings - Fork 196
Open
Description
Hello,
I've encountered an issue when using server actions with Next.js and attempting to validate phone numbers on the server side.
Currently, the documentation/code suggests using:
import { isValidPhoneNumber } from "react-phone-number-input";However, this import is client-side oriented and might not be suitable for server-side validations due to its dependency on the react-phone-number-input package, which is primarily designed for client-side React applications.
As an alternative, it would be much better if there were a usage like this for server-side validations within Next.js server actions.
import { isValidPhoneNumber } from 'react-phone-number-input/libphonenumber';or
import { isValidPhoneNumber } from 'react-phone-number-input/libphonenumber';
import { isValidPhoneNumber } from 'react-phone-number-input/core/libphonenumber';ahkhanjani, jakeorr and abeisleem
Metadata
Metadata
Assignees
Labels
No labels