🐛 (dify) Fix Dify error when inputs are empty
This commit is contained in:
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