In my phone number validation i need to validate only 9,10,14 digit numbers and 11,12,13 numbers are not valid,if phone number start with + then any digit number should be valid.Any preg_match code available?
            Asked
            
        
        
            Active
            
        
            Viewed 274 times
        
    1 Answers
1
            You can try this :
preg_match('/(?=^\d{9,10}$)|(?=^\d{14}$)|(?=^\+\d*)/', '+123456789012', $matches);
print_r($matches);
 
    
    
        Shubham Shendage
        
- 124
- 4
 
    