We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34995d2 commit e8dba5fCopy full SHA for e8dba5f
src/components/shared/Validations.tsx
@@ -1,3 +1,4 @@
1
+import { safeStringify } from '@stoplight/json';
2
import { Dictionary } from '@stoplight/types';
3
import { Popover } from '@stoplight/ui-kit';
4
import cn from 'classnames';
@@ -50,7 +51,7 @@ export const Validations: React.FunctionComponent<IValidations> = ({
50
51
} else {
52
elem = (
53
<div className="m-1 px-1 bg-gray-2 dark:bg-gray-8 font-bold text-sm rounded" key={index}>
- {JSON.stringify(validation)}
54
+ {typeof validation === 'string' ? `"${validation}"` : safeStringify(validation)}
55
</div>
56
);
57
}
0 commit comments