3cada58908
Closes [#1526](https://github.com/twentyhq/core-team-issues/issues/1526) --------- Co-authored-by: Félix Malfait <felix@twenty.com> Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
9 lines
218 B
TypeScript
9 lines
218 B
TypeScript
import camelCase from 'lodash.camelcase';
|
|
import { z } from 'zod';
|
|
|
|
export const camelCaseStringSchema = z
|
|
.string()
|
|
.refine((value) => camelCase(value) === value, {
|
|
error: 'String should be camel case',
|
|
});
|