atlp-rwanda/hackers-ec-Fe

View on GitHub
src/validations/auth/login.validation.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import { z } from 'zod';

export const LoginSchema = z.object({
    email: z.string().email({ message: 'Invalid email address' }),
    password: z
        .string()
        .min(5, { message: 'Password must be 5 or more characters long' }),
});

export type LoginSchemaType = z.infer<typeof LoginSchema>;