How can I set a dropdown as required?
I am using CRUD template from Barcelona and when I put required in the p-dropdown I get this error:
Code: Select all
error TS2322: Type 'string' is not assignable to type 'boolean'.
Code: Select all
<p-dropdown [options]="regions" required [(ngModel)]="locacion.regin" placeholder="Select a Region" [showClear]="true" optionLabel="name" emptyMessage="No records" dataKey="id" [autoDisplayFirst]="false"></p-dropdown>