From c3d9a5a4f200e1a6fbcd785c00e2bde25a8c1181 Mon Sep 17 00:00:00 2001 From: Nate Kelley <133379588+nate-kelley-buster@users.noreply.github.com> Date: Wed, 28 May 2025 13:22:51 -0600 Subject: [PATCH] Update web/src/api/asset_interfaces/datasources/interfaces.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- web/src/api/asset_interfaces/datasources/interfaces.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/api/asset_interfaces/datasources/interfaces.ts b/web/src/api/asset_interfaces/datasources/interfaces.ts index 86c45e9da..6e891d24f 100644 --- a/web/src/api/asset_interfaces/datasources/interfaces.ts +++ b/web/src/api/asset_interfaces/datasources/interfaces.ts @@ -150,9 +150,9 @@ export const DatabricksCredentialsSchema = z.object({ export type DatabricksCredentials = z.infer; export const SQLServerCredentialsSchema = z.object({ - name: z.string(), + name: z.string().check(z.minLength(1, 'Name must not be empty')), type: z.literal('sqlserver'), - host: z.string(), + host: z.string().check(z.minLength(1, 'Host must not be empty')), port: z .number() .check( @@ -161,8 +161,8 @@ export const SQLServerCredentialsSchema = z.object({ ), username: z.string().check(z.minLength(1, 'Username must not be empty')), password: z.string().check(z.minLength(1, 'Password must not be empty')), - default_database: z.string(), - default_schema: z.string() + default_database: z.string().check(z.minLength(1, 'Database must not be empty')), + default_schema: z.string().check(z.minLength(1, 'Schema must not be empty')) }); export type SQLServerCredentials = z.infer;