Skip to content

Expose Validators from BetterAuth Tables #108

@RetroThorium

Description

@RetroThorium

Hi,

Thank you so much for the amazing work. I was wondering if this component provides validators to be used from the main app. For example , if I have a mutation that takes in user id .. would it be possible to validate against that or v.string() is the only alternative.

Consider an example:

export const addResource = mutation({
    args: {
        title: v.string(),
        ownerId:  v.id("user") // <--- this doesn't work as user table is inside betterauth component 
    },
    handler: async (ctx, { title,  ownerId }) => {
        // Insert resource
    },
});

If there are no validators, is there a plan to expose them?

Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions