1. Component Guide
  2. Form file upload
  3. With error
Form file upload example

With error

How it looks (preview)

Error: Please upload a file

How to call this example

<%= render "govuk_publishing_components/components/file_upload", {
  label: {
    text: "Upload a file"
  },
  name: "file-upload-with-error",
  error_message: "Please upload a file"
} %>