Please don't validate user input this way. If you're trying to validate user input, it's generally better to verify that you have the right number of digits and then do your own formatting. To validate that you have 11-13 digits in your input string, even if it's not perfectly formatted, consider the following:
input = " + ( 11 ) 123-456-7890 "
input.delete! "^0-9"
input.length >= 11 && input.length <= 13
#=> true
input_chars = input.chars
phone_number, country_code = input_chars.pop(10).join, input_chars.join
p formatted_number = "+(%d) %d" % [country_code, phone_number]
#=> "+(11) 1234567890"
On the other hand, if you have a data set where you want to validate the formatting itself, that's a different story. You can look for 1-3 digits followed by 10 digits, along with whatever anchors or formatting you're looking for. For example:
expected_format = /\A\+\d{1,3}-\d{10}\z/
input = "+91-9999999999"
input.match? expected_format
#=> true
input = "91-9999999999"
input.match? expected_format
#=> false
input = "+1111-012345689"
input.match? expected_format
#=> false