Is the Phone Number Valid?

Your task is to create a program that uses regular expressions to validate phone numbers. A valid phone number can have anywhere between 10 to 14 digits and may start with an optional + symbol.
The input contains a single line with a phone number.
The program should print Valid if the given phone number is valid and Invalid otherwise.
Input
Output
+12345678901
Valid
123456789
Invalid
123456789012345
Invalid
+12345678901234
Valid
 

Constraints

Time limit: 2.4 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in