From 9d6d84859009ff37357853cf54654ad75ce7d80f Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Tue, 12 Oct 2021 16:46:27 +0200 Subject: [PATCH] Support any URN Signed-off-by: Alexis Sellier --- src/Form.svelte | 2 +- src/base/registrations/View.svelte | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Form.svelte b/src/Form.svelte index 41c3150ec..4f3ac7c37 100644 --- a/src/Form.svelte +++ b/src/Form.svelte @@ -25,7 +25,7 @@ handle: /^[a-zA-Z0-9-_]{1,39}$/, address: /^0x[a-zA-Z0-9]{40}$/, id: /^[a-z0-9]+$/, - caip10: /^[:-a-zA-Z0-9]{5,41}:[a-zA-Z0-9]{1,64}$/, + urn: /^[a-z]+:[a-zA-Z0-9:-]{1,64}$/, // Just make sure there is a TLD at the end. domain: /\.[a-z]{2,}$/, }; diff --git a/src/base/registrations/View.svelte b/src/base/registrations/View.svelte index 01f644201..7ed2d0bb1 100644 --- a/src/base/registrations/View.svelte +++ b/src/base/registrations/View.svelte @@ -86,9 +86,9 @@ { name: "seed.id", label: "Seed ID", validate: "id", placeholder: "hynkyndc6w3p8urucakobzncqny7xxtw88...", description: "The Device ID of a Radicle Link node that hosts entities associated with this name.", value: r.profile.seedId, editable: true }, - { name: "project.anchors", label: "Anchors", validate: "caip10", placeholder: "CAIP-10 ID, eg. eip155:1:0x4a9cf21...", - description: "The alternative address under which associated project anchors can be found. " - + "To point to a Radicle Org on Ethereum, prefix the org address with `eip155:1:`", + { name: "anchors", label: "Anchors", validate: "urn", placeholder: "URN, eg. eip155:1:0x4a9cf21...", + description: "URN under which associated project anchors can be found. " + + "To point to a Radicle org on Ethereum, use the CAIP-10 ID, eg. *eip155:1:0x4a9cf21...*", value: r.profile.anchorsAccount, editable: true }, ]; state = { status: Status.Found, registration: r, owner };