🐛 (dify) Fix Dify error when inputs are empty
This commit is contained in:
@ -15,6 +15,7 @@
|
||||
"@typebot.io/tsconfig": "workspace:*",
|
||||
"@types/escape-html": "^1.0.4",
|
||||
"@types/nodemailer": "6.4.8",
|
||||
"@types/validator": "13.11.9",
|
||||
"next": "14.1.0",
|
||||
"nodemailer": "6.9.3",
|
||||
"typescript": "5.3.2"
|
||||
@ -44,7 +45,7 @@
|
||||
"remark-parse": "11.0.0",
|
||||
"stripe": "12.13.0",
|
||||
"unified": "11.0.4",
|
||||
"zod": "3.22.4",
|
||||
"ky": "1.1.3"
|
||||
"validator": "13.11.0",
|
||||
"zod": "3.22.4"
|
||||
}
|
||||
}
|
||||
|
10
packages/lib/validators/isURL.ts
Normal file
10
packages/lib/validators/isURL.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import isURL, { IsURLOptions } from 'validator/lib/isURL'
|
||||
|
||||
const customIsURL = (val: string, options?: IsURLOptions) =>
|
||||
isURL(val, {
|
||||
protocols: ['https', 'http'],
|
||||
require_protocol: true,
|
||||
...options,
|
||||
})
|
||||
|
||||
export { customIsURL as isURL }
|
Reference in New Issue
Block a user