diff --git a/package.json b/package.json index c904be6..fdea987 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "geolocation", - "version": "1.3.0", + "version": "1.4.0", "description": "A form field that provides the user's current geolocation", "author": "andz-bb", "license": "MIT", diff --git a/schema.json b/schema.json index 828ac1d..093ea8b 100644 --- a/schema.json +++ b/schema.json @@ -29,6 +29,16 @@ "label": "Disabled", "key": "disabled", "defaultValue": false + }, + { + "type": "validation/number", + "label": "Latitude Validation", + "key": "latitudeValidation" + }, + { + "type": "validation/number", + "label": "Longitude Validation", + "key": "longitudeValidation" } ] } diff --git a/src/Component.svelte b/src/Component.svelte index 74f9dab..80a7c8f 100644 --- a/src/Component.svelte +++ b/src/Component.svelte @@ -7,6 +7,8 @@ export let latitudeField; export let longitudeField; + export let latitudeValidation; + export let longitudeValidation; const { styleable } = getContext("sdk"); const component = getContext("component"); @@ -61,7 +63,7 @@ "number", latitude, false, - null, + latitudeValidation, formStep ); @@ -77,7 +79,7 @@ "number", longitude, false, - null, + longitudeValidation, formStep );