You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get my head around this integration, my use case may or may not be unique but I am struggling to make this work.
Below is my users table schema, I am trying to create a valibot schema from that for validating the input for an update operation. I only want to allow for the one field named externalId to be updated. I am clueless about the correct way to create this custom schema from the drizzle schema, or maybe I am over thinking this and should just create a native valibot schema and use that?
exportconstuserUpdateSchema=createUpdateSchema(users,{externalId: (schema)=>v.pipe(schema,v.maxLength(100,'External ID must be less than 100 characters'))});
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Devs...
I am trying to get my head around this integration, my use case may or may not be unique but I am struggling to make this work.
Below is my users table schema, I am trying to create a valibot schema from that for validating the input for an update operation. I only want to allow for the one field named externalId to be updated. I am clueless about the correct way to create this custom schema from the drizzle schema, or maybe I am over thinking this and should just create a native valibot schema and use that?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions