Checking requiredMetaFields lenght

Under restriction i have requiredMetaFields:[‘filechecksum’]. That metaField is checksum for SHA256 so i want to check the length of that field entry value so in case this is not right length string i get error because it is not valid?

Unfortunately, you can’t currently do that with restrictions. You can do two things though.

  1. Show a notification when it’s not good
const onChange = (event) => {
  if (event.target.value < 10) {
    uppy.info('some message', 'error')
  }
}
uppy.use(Dashboard, {
  trigger: '#pick-files',
  metaFields: [
    {
      id: 'checksum',
      name: 'SHA256 Checksum',
      render ({ value, onChange, required, form }, h) {
        return h('input', { type: 'text', required, form, onChange })
      },
    },
  ],
})
  1. Create a custom preProsessor plugin that checks the values and does something.