import { v } from "@wrnexus/validation";

export default v.object({
  name: v
    .string()
    .required("Enter your name")
    .trim()
    .min(2, "Name must contain at least 2 characters")
    .max(80, "Name must contain at most 80 characters"),
  email: v
    .string()
    .required("Enter your email address")
    .trim()
    .email("Enter a valid email address")
    .max(160, "Email address is too long"),
  topic: v
    .string()
    .required("Choose a topic")
    .oneOf(["general", "security", "billing", "integration"], "Choose a valid topic"),
  message: v
    .string()
    .required("Enter your message")
    .trim()
    .min(10, "Message must contain at least 10 characters")
    .max(1000, "Message must contain at most 1000 characters"),
  consent: v.boolean().required("Confirm that we may process this request"),
});
