feat: implement comprehensive Form UI library with React Hook Form integration, Zod validation, and i18n support.

This commit is contained in:
Firman Ramdhani
2026-06-15 18:40:22 +07:00
parent 00a2f218cc
commit a72b73bac4
45 changed files with 2064 additions and 10 deletions
@@ -0,0 +1,15 @@
import { z } from 'zod';
export const baseValidator = z.object({
email: z.string().email({
message: JSON.stringify({ key: 'validation:invalid_email' }),
}),
name: z.string().min(3, {
message: JSON.stringify({
key: 'validation:min_length',
values: { field: 'Nama', min: 3 },
}),
}),
});
export type BaseValidatorType = z.infer<typeof baseValidator>;
+1
View File
@@ -0,0 +1 @@
export * from './base.validator';