mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
update deps, install vuelidate and add custom validators
This commit is contained in:
parent
19d3e58d3f
commit
4512962412
3 changed files with 30 additions and 6 deletions
|
@ -11,20 +11,21 @@
|
|||
"i18n:report": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/locales/**/*.json'"
|
||||
},
|
||||
"dependencies": {
|
||||
"bootstrap-vue": "^2.17.3",
|
||||
"bootstrap-vue": "^2.18.1",
|
||||
"core-js": "^3.6.5",
|
||||
"date-fns": "^2.16.1",
|
||||
"fork-awesome": "^1.1.7",
|
||||
"vue": "^2.6.12",
|
||||
"vue-i18n": "^8.21.1",
|
||||
"vue-router": "^3.4.5",
|
||||
"vue-i18n": "^8.22.1",
|
||||
"vue-router": "^3.4.7",
|
||||
"vuelidate": "^0.7.5",
|
||||
"vuex": "^3.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~4.4.0",
|
||||
"@vue/cli-plugin-eslint": "~4.4.0",
|
||||
"@vue/cli-plugin-router": "^4.5.6",
|
||||
"@vue/cli-plugin-vuex": "^4.5.6",
|
||||
"@vue/cli-plugin-router": "^4.5.8",
|
||||
"@vue/cli-plugin-vuex": "^4.5.8",
|
||||
"@vue/cli-service": "~4.4.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"bootstrap": "^4.5.2",
|
||||
|
@ -66,7 +67,8 @@
|
|||
],
|
||||
"template-curly-spacing": "off",
|
||||
"indent": "off",
|
||||
"no-irregular-whitespace": "off"
|
||||
"no-irregular-whitespace": "off",
|
||||
"no-unused-vars": "warn"
|
||||
}
|
||||
},
|
||||
"browserslist": [
|
||||
|
|
19
app/src/helpers/validators/customValidators.js
Normal file
19
app/src/helpers/validators/customValidators.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
import { helpers } from 'vuelidate/lib/validators'
|
||||
|
||||
const alphalownum_ = helpers.regex('alphalownum_', /^[a-z0-9_]+$/)
|
||||
|
||||
const includes = items => item => helpers.withParams(
|
||||
{ type: 'includes', value: item }, (item) => {
|
||||
return items ? items.includes(item) : false
|
||||
})(item)
|
||||
|
||||
const unique = items => item => helpers.withParams(
|
||||
{ type: 'unique', arg: items, value: item },
|
||||
item => items ? !items.includes(item) : true
|
||||
)(item)
|
||||
|
||||
export {
|
||||
alphalownum_,
|
||||
includes,
|
||||
unique
|
||||
}
|
3
app/src/helpers/validators/index.js
Normal file
3
app/src/helpers/validators/index.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
// helper module to expose custom and vuelidate validators.
|
||||
export * from 'vuelidate/lib/validators'
|
||||
export * from './customValidators'
|
Loading…
Reference in a new issue