export const validateEmail = (email) => {
  if (!email) return true;
  const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
  return emailRegex.test(email);
};

export const validatePhone = (phone) => {
  if (!phone) return true;
  const phoneRegex = /^1[3-9]\d{9}$/;
  return phoneRegex.test(phone);
};

export const validateProjectNo = (projectNo) => {
  if (!projectNo) return true;
  const regex = /^[A-Z0-9]+$/;
  return regex.test(projectNo);
};
