Although the method is very simple, its also not terribly robust, so as well as looking at Regex in this tutorial, well also take a look at a more resilient way of validating a phone number using AbstractAPIs free phone number validator. A much better idea is to use a validation library or a dedicated phone number validation API. Next.js: Next.js. Copy The useFormReact hook gives us a handleSubmit function, which must be passed to the onSubmit handler of the