I have a form where I want to implement the MAXLENGTH validation only if the value is not equal to 0.
So if parameter.valueMaxlength === 0 { then dont execute maxlength validation }
Is there a way to write this logic in the html file.
<mat-form-field *ngSwitchCase="'TEXTBOX'" class="example-full-width">
<input
matInput
[placeholder]="parameter.displayName"
[formControlName]="parameter.id"
[id]="parameter.id"
[type]="parameter.dataType"
[maxlength] = "parameter.valueMaxlength"
/>
</mat-form-field>
[attr.maxlength] = "yourcondition ? parameter.valueMaxlength : null"