@transcend-io/contact-form-schema
Advanced tools
Comparing version 1.1.0 to 2.0.0
@@ -54,6 +54,6 @@ import { z } from 'zod'; | ||
*/ | ||
consent: z.ZodUnion<[z.ZodBoolean, z.ZodString]>; | ||
consent: z.ZodUnion<[z.ZodBoolean, z.ZodEnum<["true", "false"]>]>; | ||
}, "strip", z.ZodTypeAny, { | ||
email: string; | ||
consent: string | boolean; | ||
consent: boolean | "true" | "false"; | ||
firstName?: string | undefined; | ||
@@ -76,3 +76,3 @@ lastName?: string | undefined; | ||
email: string; | ||
consent: string | boolean; | ||
consent: boolean | "true" | "false"; | ||
firstName?: string | undefined; | ||
@@ -200,6 +200,6 @@ lastName?: string | undefined; | ||
*/ | ||
consent: z.ZodUnion<[z.ZodBoolean, z.ZodString]>; | ||
consent: z.ZodUnion<[z.ZodBoolean, z.ZodEnum<["true", "false"]>]>; | ||
}, "strip", z.ZodTypeAny, { | ||
email: string; | ||
consent: string | boolean; | ||
consent: boolean | "true" | "false"; | ||
firstName?: string | undefined; | ||
@@ -222,3 +222,3 @@ lastName?: string | undefined; | ||
email: string; | ||
consent: string | boolean; | ||
consent: boolean | "true" | "false"; | ||
firstName?: string | undefined; | ||
@@ -225,0 +225,0 @@ lastName?: string | undefined; |
@@ -7,3 +7,3 @@ import { phone } from 'phone'; | ||
*/ | ||
export const CONTACT_FORM_VERSION = '1.1.0'; | ||
export const CONTACT_FORM_VERSION = '2.0.0'; | ||
/** | ||
@@ -15,11 +15,11 @@ * The fields that are part of the contact form itself. | ||
/** The submitter's first name */ | ||
firstName: z.string().optional(), | ||
firstName: z.string().min(1).optional(), | ||
/** The submitter's last name */ | ||
lastName: z.string().optional(), | ||
lastName: z.string().min(1).optional(), | ||
/** The submitter's work email */ | ||
email: z.string().email(), | ||
/** The submitter's job title */ | ||
title: z.string().optional(), | ||
title: z.string().min(1).optional(), | ||
/** The submitter's company name */ | ||
company: z.string().optional(), | ||
company: z.string().min(1).optional(), | ||
/** The company's employee count */ | ||
@@ -43,5 +43,5 @@ companySize: z | ||
/** The submitter's country of residence */ | ||
country: z.string().optional(), | ||
country: z.string().min(2).optional(), | ||
/** The submitter's state of residence */ | ||
state: z.string().optional(), | ||
state: z.string().min(2).optional(), | ||
/** Any text that the submitter sent with this submission */ | ||
@@ -52,6 +52,6 @@ message: z.string().optional(), | ||
.object({ | ||
partnerFirstName: z.string(), | ||
partnerLastName: z.string(), | ||
partnerEmail: z.string(), | ||
partnerCompany: z.string(), | ||
partnerFirstName: z.string().min(1), | ||
partnerLastName: z.string().min(1), | ||
partnerEmail: z.string().email(), | ||
partnerCompany: z.string().min(1), | ||
}) | ||
@@ -64,3 +64,3 @@ .optional(), | ||
*/ | ||
consent: z.union([z.boolean(), z.string()]), | ||
consent: z.union([z.boolean(), z.enum(['true', 'false'])]), | ||
}); | ||
@@ -67,0 +67,0 @@ /** |
{ | ||
"name": "@transcend-io/contact-form-schema", | ||
"type": "module", | ||
"version": "1.1.0", | ||
"version": "2.0.0", | ||
"description": "Schema for the marketing contact form.", | ||
@@ -6,0 +6,0 @@ "license": "UNLICENSED", |
19359