-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to override what faker.js generates for a specific fields #12
Comments
Yeah, that's a good idea. I tried to find a way to get the |
follow up here: prisma/prisma#20385 |
That would definitely be the most ideal way of doing it. But i would still be open to the idea of overriding with comments. I know faker text generation is supposted to save time but some time we might want someth more than just I used some zod schema generators and I have to override them for almost most fields. /// @zod.custom.use(z.coerce.number().positive({message: "Must be a positive interger"})) Thanks for the lib btw <3 |
I second the idea of being able to override specific fields with:
or
This would be especially helpful for optional fields. |
I'd be happy to review and merge a PR with this change! |
Sounds good! I will see if I can work that in. |
+1 need this as well. |
Trying to achieve this
It still generates a fake string
user_id: faker.lorem.words(5)
I know its already possible to generate cusom JSONs and that works! But this wouldve been a nice addition.
I'm not sure if it already exist.
The text was updated successfully, but these errors were encountered: