How to overwrite default error message in primeNG dropdown

UI Components for Angular
Post Reply
Prithvi_Prime
Posts: 1
Joined: 17 Feb 2021, 02:41

17 Feb 2021, 02:51

can anyone help me to customize the default error message in p-dropdown

Here is the code:

Code: Select all

<p-dropdown [options]="vehicleList" [(ngModel)]="selectedVehicle" [ngModelOptions]="{standalone: true}" placeholder="Select" optionLabel="label" [showClear]="false" dropdownIcon="pi pi-caret-down" required requiredMessage="Please select the vehicle">
Please find the image for reference: https://i.stack.imgur.com/hQHTF.png

need to change the "Please select item in list" error message to "Select a vehicle".

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 20 guests