2
0

🐛 (dify) Fix Dify error when inputs are empty

This commit is contained in:
Baptiste Arnaud
2024-02-12 11:41:57 +01:00
parent 5226b06fe1
commit f5bdba53b9
11 changed files with 132 additions and 67 deletions

View 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 }