From e38172c7cfa4f3f12a56ce865457c2a4d981eddf Mon Sep 17 00:00:00 2001 From: gabe Date: Mon, 3 Jun 2024 08:25:18 -0700 Subject: [PATCH] update regex --- .../verifiable-credential/verifiable-credential-schema.json | 4 ++-- .../verifiable-presentation-schema.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/schema/verifiable-credential/verifiable-credential-schema.json b/schema/verifiable-credential/verifiable-credential-schema.json index b4966c71d..4939c2564 100644 --- a/schema/verifiable-credential/verifiable-credential-schema.json +++ b/schema/verifiable-credential/verifiable-credential-schema.json @@ -213,11 +213,11 @@ }, "validFrom": { "type": "string", - "pattern": ".*(Z|(\\+|-)[0-9][0-9]:[0-9][0-9])" + "pattern": "-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?|(24:00:00(\\.0+)?))(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))" }, "validUntil": { "type": "string", - "pattern": ".*(Z|(\\+|-)[0-9][0-9]:[0-9][0-9])" + "pattern": "-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?|(24:00:00(\\.0+)?))(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))" }, "credentialSubject": { "oneOf": [ diff --git a/schema/verifiable-presentation/verifiable-presentation-schema.json b/schema/verifiable-presentation/verifiable-presentation-schema.json index 4e7bc9d10..0427024dc 100644 --- a/schema/verifiable-presentation/verifiable-presentation-schema.json +++ b/schema/verifiable-presentation/verifiable-presentation-schema.json @@ -54,7 +54,7 @@ }, "created": { "type": "string", - "pattern": ".*(Z|(\\+|-)[0-9][0-9]:[0-9][0-9])" + "pattern": "-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?|(24:00:00(\\.0+)?))(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))" }, "domain": { "type": "string"