<select [(ngModel)]="model.provider" name="provider" #providerField="ngModel" class="field-control" />
<option [ngValue]="null">Use parent value</option>
<option *ngFor="let option of providers" [value]="option.key">{{option.key}}</option>
</select>
export class TicketModel {
@StringType()
provider?: string | null; // not required
}
Selecting the valid option with null value when @StringType() annotation is applied to the model property results in yup error, as schema is not defined as .nullable() or .notRequired() by default.
This problem can occur in various annotation types when not required.
Selecting the valid option with null value when @StringType() annotation is applied to the model property results in yup error, as schema is not defined as
.nullable()or.notRequired()by default.This problem can occur in various annotation types when not required.