mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-29 02:46:25 +02:00
feat: Update SearxNG connector form validation, enhance connector connect view with additional properties, and refine type handling in connector dialog for improved schema compliance.
This commit is contained in:
parent
21146485e6
commit
4d6186a43a
5 changed files with 17 additions and 8 deletions
|
|
@ -27,7 +27,8 @@ const searxngFormSchema = z.object({
|
|||
message: "Connector name must be at least 3 characters.",
|
||||
}),
|
||||
host: z
|
||||
.string({ required_error: "Host is required." })
|
||||
.string()
|
||||
.min(1, { message: "Host is required." })
|
||||
.url({ message: "Enter a valid SearxNG host URL (e.g. https://searxng.example.org)." }),
|
||||
api_key: z.string().optional(),
|
||||
engines: z.string().optional(),
|
||||
|
|
@ -37,7 +38,7 @@ const searxngFormSchema = z.object({
|
|||
.string()
|
||||
.regex(/^[0-2]?$/, { message: "SafeSearch must be 0, 1, or 2." })
|
||||
.optional(),
|
||||
verify_ssl: z.boolean().default(true),
|
||||
verify_ssl: z.boolean(),
|
||||
});
|
||||
|
||||
type SearxngFormValues = z.infer<typeof searxngFormSchema>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue