check in regex that text is in number format or not code example Example: phone number regex ^[+0]{0,2}(91)?[0-9]{10}$