DT
Size: a a a
DT
as
this.fb.group({
firstName: ['', [ Validators.required, Validators.pattern(/\D{2,}/)]],
lastName: ['', [ Validators.required, Validators.pattern(/\D{2,}/)]],
email: ['', [Validators.required, Validators.email]],
phones: this.fb.array([
['', Validators.required]
]),
phoneTypes: this.fb.array([
[{value: this.phoneTypes[0], disabled: true}, Validators.required]
])
});
S
DT
as
S
as
as
S
as
as
DT
DT
as
<div formArrayName="phoneTypes">
<nb-select *ngFor="let type of formGroup[activeForm].data.get('phoneTypes').controls; let i = index"
[formControlName]="i"
placeholder="Phone{{i+1}} Type"
fullWidth="true"
[disabled]="i === 0"
class="contract-form__select-type"
>
<nb-option *ngFor="let type of phoneTypes" [value]="type">{{type}}</nb-option>
</nb-select>
</div>
as
S
S
S
as