feat: implement project development module, transfer management features, and industrial AVM model integration

This commit is contained in:
Ho Ngoc Hai
2026-04-18 20:34:35 +07:00
parent 0f3b4d7b0d
commit 38b9def99a
66 changed files with 9051 additions and 17 deletions

View File

@@ -0,0 +1,24 @@
import { z } from 'zod';
/**
* Vietnamese phone number rule:
* - 911 digits, optional leading +84 or 0.
* We keep validation pragmatic: whitespace is stripped, then the remaining
* string must be 911 digits (country code / leading zero stripped).
*/
const PHONE_REGEX = /^(?:\+?84|0)?\d{9,11}$/;
export const inquiryFormSchema = z.object({
message: z
.string({ error: 'Vui lòng nhập nội dung tin nhắn' })
.trim()
.min(1, 'Vui lòng nhập nội dung tin nhắn')
.max(2000, 'Tin nhắn không được vượt quá 2000 ký tự'),
phone: z
.string({ error: 'Vui lòng nhập số điện thoại' })
.trim()
.min(9, 'Vui lòng nhập số điện thoại hợp lệ')
.regex(PHONE_REGEX, 'Số điện thoại không hợp lệ'),
});
export type InquiryFormData = z.infer<typeof inquiryFormSchema>;