squibler.
squibler.
ZZod
Created by squibler. on 4/21/2024 in #questions
squibler. - Hi folks. I'm looking to validate a...
Using this now:
import { blacklist } from '~/blacklist';
export const notBlacklisted = (input: string): boolean => {
return !blacklist.find((element) => element === input);
};
import { blacklist } from '~/blacklist';
export const notBlacklisted = (input: string): boolean => {
return !blacklist.find((element) => element === input);
};
with
import { z } from 'zod'
const schema = z.string().refine(notBlacklisted);
import { z } from 'zod'
const schema = z.string().refine(notBlacklisted);
4 replies