MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / validateUrlSlash

Function validateUrlSlash

frontend/packages/common/src/utils/validate.ts:3–8  ·  view source on GitHub ↗
(_, value)

Source from the content-addressed store, hash-verified

1import { $t } from '@common/locales'
2
3export const validateUrlSlash = (_, value) => {
4 if (value && value.includes('//')) {
5 return Promise.reject(new Error($t('暂不支持带有双斜杠//的url')))
6 }
7 return Promise.resolve()
8}
9
10export const validateIPorCIDR = (rule, value) => {
11 if (!value) {

Callers

nothing calls this directly

Calls 1

$tFunction · 0.90

Tested by

no test coverage detected