chore: restructure packages of the project (#7)
* chore: restructure validation package * chore: move zod only to validation package * chore: rename packages from alparr to homarr * chore: move mantine core, dates and icons library to ui package, move most other mantine packages to seperate packages for further customization and centralization * chore: fix formatting * fix: wrong typecheck command in turbo generator * chore: fix formatting * chore: address pull request feedback * chore: fix ci check issues
This commit is contained in:
@@ -1 +1,5 @@
|
||||
export * from "./user";
|
||||
import { userSchemas } from "./user";
|
||||
|
||||
export const validation = {
|
||||
user: userSchemas,
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@ import { z } from "zod";
|
||||
const usernameSchema = z.string().min(3).max(255);
|
||||
const passwordSchema = z.string().min(8).max(255);
|
||||
|
||||
export const initUserSchema = z
|
||||
const initUserSchema = z
|
||||
.object({
|
||||
username: usernameSchema,
|
||||
password: passwordSchema,
|
||||
@@ -14,7 +14,12 @@ export const initUserSchema = z
|
||||
message: "Passwords do not match",
|
||||
});
|
||||
|
||||
export const signInSchema = z.object({
|
||||
const signInSchema = z.object({
|
||||
name: z.string(),
|
||||
password: z.string(),
|
||||
});
|
||||
|
||||
export const userSchemas = {
|
||||
signIn: signInSchema,
|
||||
init: initUserSchema,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user