Search...
valid
Indicates if a required file was selected, and if the file is valid for upload to the Media Manager.
Description
The valid
property indicates if the validation passed. valid
is false
if, for example:
- A file was not selected, or was selected but not uploaded, in cases where the file is required.
- A file's type is not supported.
- A file's size is not within the allowed limit.
- There was a failed attempt to upload a file that passed input validation checks to the Media Manager with
uploadFiles()
. This could happen, for example, if the Internet connection is not stable. In this case, thefileNotUploaded
validity
property is also set to false.
Type:
booleanRead Only
Was this helpful?
Get whether the file is valid for upload
Copy Code
1let isValid = $w("#myFile").valid; // false