* I am using **Angular 8**.
* I want to force uppercase on a field, **depending on a condition**. When the user type something like 'Hi', the value must be changed to 'HI'.
* I want this uppercase applied before the validations are triggered (using reactive forms).
* I don't want to update the input value as uppercase **after** the validations were triggered and use the lowercase value in the validations with a .toUpperCase() because i have a lot of validations and i have other things like 'masks' with Regexp applied on the input field and i need to force uppercase on input value directly. Thus this is not working :

```html
<input #input (input)="input.value=$event.target.value.toUpperCase()">

```

* I found [this answer](https://stackoverflow.com/a/50447152/12040427) and that's work fine :

```html
<input oninput="this.value = this.value.toUpperCase()">

```

**but not my use case because I don't want to duplicate my html tags** because i have a lot of configuration on this field and that would lead to repetitive code and i could modify only one input tag and not the other and introduce a bug.... Thus, i don't want to use this : 

```html
<input *ngIf="uppercase" oninput="this.value = this.value.toUpperCase()">
<input *ngIf="!uppercase">

```

I would use something like this (but that's not working of course) : 

```html
<input oninput="if ({{this.uppercase}}) { this.value = this.value.toUpperCase();} ">

```

[Demo](https://stackblitz.com/edit/angular-1u2vnk)