From 0d5e2947615218fa76f0d4c5642e52ea1fd7a681 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 11 Nov 2019 22:36:18 -0600 Subject: [PATCH 1/2] fix: validations key overlaps value --- src/__fixtures__/default-schema.json | 5 ++++- src/components/shared/Validations.tsx | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/__fixtures__/default-schema.json b/src/__fixtures__/default-schema.json index 013e62f4..6aef0ec2 100644 --- a/src/__fixtures__/default-schema.json +++ b/src/__fixtures__/default-schema.json @@ -9,7 +9,10 @@ "age": { "type": "number", "minimum": 0, - "maximum": 150 + "maximum": 150, + "multipleOf": 10, + "exclusiveMinimum": true, + "exclusiveMaximum": true }, "completed_at": { "type": "string", diff --git a/src/components/shared/Validations.tsx b/src/components/shared/Validations.tsx index da8bd314..cd59ffdc 100644 --- a/src/components/shared/Validations.tsx +++ b/src/components/shared/Validations.tsx @@ -51,8 +51,8 @@ export const Validations: React.FunctionComponent = ({ required, v return (
-
{key}:
-
{elem}
+
{key}:
+
{elem}
); })} From 8729e743a84977567d0bab1f504de365e77d8bb6 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 11 Nov 2019 22:40:49 -0600 Subject: [PATCH 2/2] chore: update snapshot --- src/utils/__tests__/__snapshots__/renderSchema.spec.ts.snap | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/utils/__tests__/__snapshots__/renderSchema.spec.ts.snap b/src/utils/__tests__/__snapshots__/renderSchema.spec.ts.snap index 1a0ecdf1..c1daa270 100644 --- a/src/utils/__tests__/__snapshots__/renderSchema.spec.ts.snap +++ b/src/utils/__tests__/__snapshots__/renderSchema.spec.ts.snap @@ -600,8 +600,11 @@ Array [ }, "properties": Object { "age": Object { + "exclusiveMaximum": true, + "exclusiveMinimum": true, "maximum": 150, "minimum": 0, + "multipleOf": 10, "type": "number", }, "completed_at": Object { @@ -713,8 +716,11 @@ Array [ "required": true, "type": "number", "validations": Object { + "exclusiveMaximum": true, + "exclusiveMinimum": true, "maximum": 150, "minimum": 0, + "multipleOf": 10, }, }, "name": "",