Socialvoid-React/specifications/index.ts

9 lines
389 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { z } from 'zod'
export const spassword = z
.string({ required_error: 'Password is required.' })
// .min(12, "The password should be 12 characters at least.")
.max(128, 'The password cant be longer than 128 characters.')
.regex(/.*[A-Z].*/, 'The password should contain a capital letter.')
.regex(/.*[0-9].*[0-9].*/, 'The password should contain 2 numbers at least.')