feat: change wording validation
This commit is contained in:
@@ -2,8 +2,16 @@ import { z } from 'zod';
|
||||
|
||||
export const authLoginSchema = z.object({
|
||||
email: z
|
||||
.string()
|
||||
.min(1, 'Email cannot be empty')
|
||||
.email('Email must be valid'),
|
||||
password: z.string().min(1, 'Password cannot be empty'),
|
||||
.string({
|
||||
required_error: 'Email tidak boleh kosong',
|
||||
invalid_type_error: 'Email harus berupa string',
|
||||
})
|
||||
.min(1, 'Email tidak boleh kosong')
|
||||
.email('Email harus valid'),
|
||||
password: z
|
||||
.string({
|
||||
required_error: 'Password tidak boleh kosong',
|
||||
invalid_type_error: 'Password harus berupa string',
|
||||
})
|
||||
.min(1, 'Password tidak boleh kosong'),
|
||||
});
|
||||
|
||||
@@ -75,7 +75,7 @@ export const InputField: FC<TInputFieldProps> = ({
|
||||
{...rest}
|
||||
/>
|
||||
{error ? (
|
||||
<p className="text-danger-500 text-xs mt-1">{error}</p>
|
||||
<p className="text-danger-500 text-xl mt-1">{error}</p>
|
||||
) : (
|
||||
helperText && (
|
||||
<p className={cn('text-cs mt-1', sizeClasses[size].helperText)}>
|
||||
|
||||
Reference in New Issue
Block a user