sdk.file_2.showuploadfileoptions.validate
Home > @matterway/sdk > File_2 > ShowUploadFileOptions > validate
File_2.ShowUploadFileOptions.validate property
/** A function that takes a DroppedFile
object and returns a promise that resolves to an object with isValid
and message
properties. If the isValid
property is false
, the message
property should contain an error message. If the isValid
property is true
, the message
property should be empty. If the validate
function is not provided, all files will be considered valid.
Signature:
validate?: (sdkFile: DroppedFile) => Promise<{
isValid: boolean;
message: string;
}>;