Validation messages can be customized using the following four options:
| Property name | Description | Default value |
| invalidFileSizeMessageSummary | Summary message of the invalid file size. The placeholder {0} refers to the file name. | {0}: Invalid file size, |
| invalidFileSizeMessageDetail | Detail message of the invalid file size. The placeholder {0} refers to the file size. | maximum upload size is {0}. |
| invalidFileTypeMessageSummary | Summary message of the invalid file type. The placeholder {0} refers to the file type. | {0}: Invalid file type, |
| invalidFileTypeMessageDetail | Detail message of the invalid file type. The placeholder {0} refers to the allowed file types. | allowed file types: {0} |
The next code snippet and screenshot demonstrate custom messages. They also show how you can set custom labels for buttons:
<p-fileUpload name="demofiles[]" url="http://localhost:3004/
fake-backend"
multiple="true" accept="...