mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-06-28 06:34:15 +00:00
feat: port mii list to use api route
also make search bar redirect to index page with search param instead of a new page
This commit is contained in:
parent
90eca1bf3f
commit
53a23f35ef
7 changed files with 116 additions and 166 deletions
|
|
@ -9,6 +9,15 @@ export const nameSchema = z
|
|||
message: "Name can only contain letters, numbers, dashes, underscores, apostrophes, and spaces.",
|
||||
});
|
||||
|
||||
export const querySchema = z
|
||||
.string()
|
||||
.trim()
|
||||
.min(2, { message: "Search query must be at least 2 characters long" })
|
||||
.max(64, { message: "Search query cannot be more than 64 characters long" })
|
||||
.regex(/^[a-zA-Z0-9-_. ']+$/, {
|
||||
message: "Search query can only contain letters, numbers, dashes, underscores, apostrophes, and spaces.",
|
||||
});
|
||||
|
||||
export const tagsSchema = z
|
||||
.array(
|
||||
z
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue