max length custom directive angular 4 code example Example: validation maxlength angular Validators.maxLength(11)