Ok, you're pretty close. Try the following:
^\+?[0-9\/.()-]{9,}$
Without start and end anchors, you allow a partial match, so it can match +123from a string :-)+123.
If you need at least 9 digits and not any characters (therefore ---...///invalid), you can use:
^\+?[\/.()-]*([0-9][\/.()-]*){9,}$
or, using lookahead - before matching the string for [0-9/.()-]*the regex engine it looks for (\D*\d){9}that consists of 9 digits, each digit that can be preceded by other characters (which we will check later).
^\+?(?=(\D*\d){9})[0-9\/.()-]*$
source
share