@careflair/common 1.0.18 → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/schemas/forms.d.ts +1 -1
- package/dist/schemas/forms.js +2 -12
- package/package.json +1 -1
package/dist/schemas/forms.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare const registrationFormSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7
7
|
lastName: z.ZodString;
|
|
8
8
|
email: z.ZodString;
|
|
9
9
|
username: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>;
|
|
10
|
-
role: z.
|
|
10
|
+
role: z.ZodString;
|
|
11
11
|
password: z.ZodString;
|
|
12
12
|
confirmPassword: z.ZodString;
|
|
13
13
|
fingerPrint: z.ZodOptional<z.ZodString>;
|
package/dist/schemas/forms.js
CHANGED
|
@@ -4,7 +4,6 @@ exports.WorkHistoryFormSchema = exports.EducationAndTrainingFormSchema = exports
|
|
|
4
4
|
const libphonenumber_js_1 = require("libphonenumber-js");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const limits_1 = require("../constants/limits");
|
|
7
|
-
const enums_1 = require("../enums");
|
|
8
7
|
const validation_1 = require("./validation");
|
|
9
8
|
/**
|
|
10
9
|
* Registration form schema
|
|
@@ -31,12 +30,7 @@ exports.registrationFormSchema = zod_1.z
|
|
|
31
30
|
.refine((value) => !value.startsWith("_"), "Username cannot start with an underscore")
|
|
32
31
|
.refine((value) => !value.endsWith("_"), "Username cannot end with an underscore")
|
|
33
32
|
.refine((value) => !value.includes("__"), "Username cannot contain consecutive underscores"),
|
|
34
|
-
role: zod_1.z
|
|
35
|
-
.string()
|
|
36
|
-
.min(1, "Please select your role")
|
|
37
|
-
.refine((val) => Object.values(enums_1.UserRole).includes(val), {
|
|
38
|
-
message: "Please select a valid role",
|
|
39
|
-
}),
|
|
33
|
+
role: zod_1.z.string().min(1, "Please select your role"),
|
|
40
34
|
password: validation_1.passwordSchema,
|
|
41
35
|
confirmPassword: zod_1.z.string().min(1, "Confirm password is required"),
|
|
42
36
|
fingerPrint: zod_1.z.string().optional(),
|
|
@@ -91,11 +85,7 @@ exports.ContactDetailsFormSchema = zod_1.z.object({
|
|
|
91
85
|
})
|
|
92
86
|
.optional()
|
|
93
87
|
.or(zod_1.z.literal("")),
|
|
94
|
-
email: zod_1.z
|
|
95
|
-
.string()
|
|
96
|
-
.email("Invalid email address")
|
|
97
|
-
.optional()
|
|
98
|
-
.or(zod_1.z.literal("")),
|
|
88
|
+
email: zod_1.z.string().email("Invalid email address").optional().or(zod_1.z.literal("")),
|
|
99
89
|
website: zod_1.z
|
|
100
90
|
.string()
|
|
101
91
|
.regex(/^(?:https?:\/\/)?[\w-]+(\.[\w-]+)+([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?$/, "Invalid URL")
|