maxlength validation input type number angular 4 code example
Example 1: validation maxlength angular
Validators.maxLength(11)
Example 2: angular maxlength directive input type number
//maxlength="10"
<input type="number" onKeyPress="if(this.value.length==10) return false;" />