I am trying to use regular expressions to validate phone numbers but its just allowing all numbers to be accepted not just 10, my regular expression is ^[0-9]{10} which should just allow 10 numbers 0-9. my test strings were 1234567890 which passed and 703482062323 which also passed. What can i do to fix this issue?
The code im using to test the regular expression is
QRegularExpression Phone_Num("^[0-9]{10}"); // 10 numbers in a phone number
QRegularExpressionMatch match = Phone_Num.match("12345612312312312121237890");
qDebug() << match.hasMatch();