Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmachin committed Jan 26, 2024
1 parent 72dbc72 commit f139500
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/data-schemas/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import { ApiError } from 'utils/apiError';
import { errors } from 'config/errors';
import { formatZodError } from 'utils/validator';

const passwordLength = 10;
const MINIMUM_PASSWORD_LENGTH = 10;

const userCreationSchema = z.object({
email: z.string().email({ message: 'Invalid email' }),
name: z.string(),
password: z
.string()
.min(passwordLength, { message: "Can't be an empty password" }),
.min(MINIMUM_PASSWORD_LENGTH, { message: "Can't be an empty password" }),
});

export type UserCreationSchema = z.infer<typeof userCreationSchema>;
Expand All @@ -21,7 +21,7 @@ const loginSchema = z.object({
email: z.string().email({ message: 'Invalid email' }),
password: z
.string()
.min(passwordLength, { message: "Can't be an empty password" }),
.min(MINIMUM_PASSWORD_LENGTH, { message: "Can't be an empty password" }),
});

export type UserLoginSchema = z.infer<typeof loginSchema>;
Expand Down

0 comments on commit f139500

Please sign in to comment.