Solução:
form, input[type=number], input[type=submit] {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 11pt;
border-radius: 4px;
display: block;
}
input[type=number] {
width: 300px;
height: 47px;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
border: 2px solid #ccc;
-moz-appearance: textfield;
-webkit-appearance: none;
}
input[type=submit] {
background-color: red;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
}
<form>
Número de telefone: <input type="number" name="quantity" min="9000000" max="9999999" title="7 digitos">
<input type="submit">
</form>
Input Text pattern PropertyHTML <input type="number"> min max Attribute https://www.w3schools.com/jsref/prop_text_pattern.asphttps://www.w3schools.com/tags/att_input_max.asp
HTML <input><input type="text"> pattern Attribute https://www.w3schools.com/tags/att_input_pattern.asp