Skip to main content

File Upload

The File Upload component allows users to select and upload one or multiple files. It supports file type restrictions, size limits, preview functionality, and comprehensive validation.

Examples

Upload multiple files with validation

Form Data:
{}

Field Properties

NameDescriptionType
multipleEnable selection of multiple filesboolean
acceptComma-separated list of accepted file types (MIME types or extensions)string
maxSizeMaximum file size in bytes (e.g., 5242880 for 5MB)number
maxFilesMaximum number of files that can be selectednumber
previewShow preview thumbnails for selected filesboolean
displayTypeComponent display type identifierstring
displayNameLabel displayed above the file inputstring
placeholderPlaceholder text shown in the file input areastring
readOnlyMake the field read-only (users cannot modify selection)boolean
requiredMake file selection mandatoryboolean

Validation Properties

The validation settings within the Text area component are crucial for ensuring that user input meets specific requirements. Here’s a breakdown of the available validation properties:

PropertyDescription
requiredWhether file selection is mandatory
minLengthSpecifies the minimum number of characters allowed in the input.
maxLengthSpecifies the maximum number of characters allowed in the input.
maxSpecifies the maximum value allowed for number inputs, also supporting dynamic conditions.
minSpecifies the minimum value allowed for number inputs, with support for dynamic values.
patternA regex pattern that the input must match to be considered valid.
validateA function for custom validation logic, which can return a boolean or an error message.
requiredDetailContains info msgs about the required validation property