The regex should invalidate the phone number if all the digits are same. For eg - 0000000,1111111,2222222,etc. should be invalid. But on the other hand if I enter 11111112 then this should be valid as it contains another digit as well. The length of the regex should be between 7 to 15.
I tried with this (?!(\d)\1{6})([0-9]{7,15}) but the same is not working as expected. If there is any better way, please suggest me the same.