diff --git a/package.json b/package.json index d4498da..f5ee4db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Budibase-File-Upload", - "version": "1.1.1", + "version": "1.1.2", "description": "An amazing Budibase component!", "license": "MIT", "svelte": "index.js", diff --git a/schema.json b/schema.json index 1b2a130..efba61b 100644 --- a/schema.json +++ b/schema.json @@ -52,6 +52,11 @@ "type": "event", "key": "onChange", "label": "On Change" + }, + { + "type": "validation/string", + "label": "Validation", + "key": "validation" } ], "info": "Created by chungchunwang on GitHub at: https://github.com/chungchunwang/Budibase-File-Upload. You can find detailed instructions there. Please report any issues or feature requests to the GitHub repo (or perhaps star!)." diff --git a/src/Component.svelte b/src/Component.svelte index 1f2b64c..a06edbc 100644 --- a/src/Component.svelte +++ b/src/Component.svelte @@ -14,6 +14,7 @@ export let acceptedFiles; export let encodingProtection; export let useBlobURL; + export let validation; //Getting budibase API const { styleable } = getContext("sdk"); @@ -34,7 +35,7 @@ "text", 0, false, - null, + validation, formStep ); $: unsubscribe = formField?.subscribe((value) => {