I am trying to validate a phone number with the international validations. I am working on the french one currently. Here is what I have, it's not working. Any suggestions
<html>
<head>
</head>
<body>
<form id="myFormId" method="post">
<label for="phoneId">Phone number</label>
<input type="text" name="phone" id="phoneId" maxlength="19" value="" />
<input type="submit" value="Submit" onClick="isValidPhonenumber()"/>
</form>
<script>
function isValidPhonenumber(value) {
return (/^\d{7,}$/).test(value.replace(/[\s()+\-\.]|ext/gi, ''));
}
</script>
</body>
</html>