MarvinKR
MarvinKR
Explore posts from servers
DTDrizzle Team
Created by MarvinKR on 7/19/2024 in #help
Error Handling for Null Values in Drizzle-Zod + Shadcn Form (React-Hook-Form)
Thanks for the fix! You rock
23 replies
DTDrizzle Team
Created by MarvinKR on 7/19/2024 in #help
Error Handling for Null Values in Drizzle-Zod + Shadcn Form (React-Hook-Form)
Yeah!
23 replies
DTDrizzle Team
Created by MarvinKR on 7/19/2024 in #help
Error Handling for Null Values in Drizzle-Zod + Shadcn Form (React-Hook-Form)
The beauty of "full-stack", I suppose haha.
23 replies
DTDrizzle Team
Created by MarvinKR on 7/19/2024 in #help
Error Handling for Null Values in Drizzle-Zod + Shadcn Form (React-Hook-Form)
Ah yeah that was my temporary fix haha.
23 replies
DTDrizzle Team
Created by MarvinKR on 7/19/2024 in #help
Error Handling for Null Values in Drizzle-Zod + Shadcn Form (React-Hook-Form)
Yeah if the user doesn't mention the founding year in the form we store it as null
23 replies
DTDrizzle Team
Created by MarvinKR on 7/19/2024 in #help
Error Handling for Null Values in Drizzle-Zod + Shadcn Form (React-Hook-Form)
and the Phone component surprisingly isn't having an issue despite phone not having notNull() in my db
23 replies
DTDrizzle Team
Created by MarvinKR on 7/19/2024 in #help
Error Handling for Null Values in Drizzle-Zod + Shadcn Form (React-Hook-Form)
All fields that don't have notNull() in my db schema
23 replies
DTDrizzle Team
Created by MarvinKR on 7/19/2024 in #help
Error Handling for Null Values in Drizzle-Zod + Shadcn Form (React-Hook-Form)
Here is my react hook form
23 replies
DTDrizzle Team
Created by MarvinKR on 7/19/2024 in #help
Error Handling for Null Values in Drizzle-Zod + Shadcn Form (React-Hook-Form)
I did this but it's not changing the error:
// Schema for inserting a company - can be used to validate API requests
export const insertCompanySchema = createInsertSchema(companies, {
email: (schema) => schema.email.email(),
websiteUrl: (schema) => schema.websiteUrl.optional(),
foundingYear: (schema) => schema.foundingYear.optional(),
description: (schema) => schema.description.optional(),
logoUrl: (schema) => schema.logoUrl.optional(),
phone: (schema) => schema.phone.optional(),
address: (schema) => schema.address.optional(),
country: (schema) => schema.country.optional(),
city: (schema) => schema.city.optional(),
score: (schema) => schema.score.optional(),
}).omit({
id: true,
createdAt: true,
});
// Schema for inserting a company - can be used to validate API requests
export const insertCompanySchema = createInsertSchema(companies, {
email: (schema) => schema.email.email(),
websiteUrl: (schema) => schema.websiteUrl.optional(),
foundingYear: (schema) => schema.foundingYear.optional(),
description: (schema) => schema.description.optional(),
logoUrl: (schema) => schema.logoUrl.optional(),
phone: (schema) => schema.phone.optional(),
address: (schema) => schema.address.optional(),
country: (schema) => schema.country.optional(),
city: (schema) => schema.city.optional(),
score: (schema) => schema.score.optional(),
}).omit({
id: true,
createdAt: true,
});
23 replies
TTCTheo's Typesafe Cult
Created by MarvinKR on 7/11/2024 in #questions
How to use uploadthing server side?
Did that, but it’s not clear. Examples are client side
14 replies
TTCTheo's Typesafe Cult
Created by MarvinKR on 7/11/2024 in #questions
How to use uploadthing server side?
Not sure if I understand how it translates in Hono
14 replies