mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-25 17:42:25 +01:00
added setup.py
This commit is contained in:
12
frontend/src/utils/validate.js
Normal file
12
frontend/src/utils/validate.js
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Created by jiachenpan on 16/11/18.
|
||||
*/
|
||||
|
||||
export function isvalidUsername (str) {
|
||||
const validMap = ['admin', 'editor']
|
||||
return validMap.indexOf(str.trim()) >= 0
|
||||
}
|
||||
|
||||
export function isExternal (path) {
|
||||
return /^(https?:|mailto:|tel:)/.test(path)
|
||||
}
|
||||
Reference in New Issue
Block a user