Phone regex doesn't work

Hello everyone,

I’m adding phone number to one of my collection types as a text field, and tried using regex to validate the value using this regex value:

“/^(009665|9665|+9665|05|5)(5|0|3|6|4|9|1|8|7)([0-9]{7})$/”

Anyhow, when i try to add a phone number for example: +966501234567 it doesn’t work, and says “The value does not match the regex.”

Am i doing something wrong? your help is really appreciated.

System Information
  • Strapi Version: v4.11.2
  • Operating System: Ubuntu v22.04
  • Database: Postgres
  • Node Version: v17.9.1
  • NPM Version: v8.11
  • Yarn Version: N/A

Try with this regexp ^\+(?:[0-9] ?){6,14}[0-9]$