Hello, I come back to you, I don't have much experience with Angular, I search a lot on the internet, but I can't find what I'm looking for, I would like my maxlenght to depend on my count of bytes, I don't have I have no choice but to use bytes at work, and I need to prevent the user from exceeding 4000 bytes, I tried to modify the maxlength each time the ngModel changes to recheck the number and modify the maxlength following but it doesn't work, I leave my Stack if anyone has an idea.
#NgModel with maxlength bytes count
7 messages · Page 1 of 1 (latest)
create a custom validator
Ok I didn't dig on that side, thanks for the lead anyway
you can either create a custom directive to block the input after a certain length and/or create a custom validator on your formControl to trigger an error
one last little detail, can I make a custom directive or validator and implement it afterwards? I would like it to be integrated into my custom component directly
shouldn't be a pb