refactor: validate objectMetadataItem with Zod on creation and update… (#4270)
* refactor: validate objectMetadataItem with Zod on creation and update & remove logic from useObjectMetadataItemForSettings * refactor: review
This commit is contained in:
@ -0,0 +1,8 @@
|
||||
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',
|
||||
});
|
||||
Reference in New Issue
Block a user