We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 80265a4 commit b31f3ebCopy full SHA for b31f3eb
firestore-send-email/functions/src/validation.ts
@@ -185,12 +185,8 @@ function formatZodError(
185
const path = issue.path.length > 0 ? issue.path.join(".") : context;
186
switch (issue.code) {
187
case "invalid_type":
188
- if (issue.message && !issue.message.startsWith("Expected")) {
189
- const customMessage = issue.message.replace(
190
- /Field 'attachments'/g,
191
- `Field '${path}'`
192
- );
193
- return customMessage;
+ if (issue.received === "undefined") {
+ return `Field '${path}' must be a ${issue.expected}`;
194
}
195
196
if (issue.expected === "string") {
0 commit comments