File Upload Validation 4 component design & features
This file upload example uses the diceui FileUpload component with the maxFiles prop set to 2. It demonstrates file count validation that prevents selecting more than two files and displays toast notifications when the limit is exceeded. A counter shows current file count versus the maximum.
File count limits are useful for forms requiring specific numbers of attachments, comparison interfaces, or systems with processing constraints. The validation prevents over-selection and helps users understand quantity requirements before completing their selection.
