* refactor: validate objectMetadataItem with Zod on creation and update & remove logic from useObjectMetadataItemForSettings * refactor: review
9 lines
220 B
TypeScript
9 lines
220 B
TypeScript
import camelCase from 'lodash.camelcase';
|
|
import { z } from 'zod';
|
|
|
|
export const camelCaseStringSchema = z
|
|
.string()
|
|
.refine((value) => camelCase(value) === value, {
|
|
message: 'String should be camel case',
|
|
});
|