mirror of
https://codeberg.org/MarkusThielker/finances.git
synced 2025-07-01 11:09:18 +00:00
Initial commit
This commit is contained in:
commit
52aed24a96
48 changed files with 6980 additions and 0 deletions
6
src/lib/form-schemas/signInFormSchema.ts
Normal file
6
src/lib/form-schemas/signInFormSchema.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
import { z } from 'zod';
|
||||
|
||||
export const signInFormSchema = z.object({
|
||||
username: z.string().min(3).max(16),
|
||||
password: z.string().min(8).max(255),
|
||||
});
|
10
src/lib/form-schemas/signUpFormSchema.ts
Normal file
10
src/lib/form-schemas/signUpFormSchema.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
import { z } from 'zod';
|
||||
|
||||
export const signUpFormSchema = z.object({
|
||||
username: z.string().min(3).max(16),
|
||||
password: z.string().min(8).max(255),
|
||||
confirm: z.string().min(8).max(255),
|
||||
}).refine(data => data.password === data.confirm, {
|
||||
message: 'Passwords do not match',
|
||||
path: ['confirm'],
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue