update deps, install vuelidate and add custom validators

This commit is contained in:
Axolotle 2020-10-23 17:40:12 +02:00
parent 19d3e58d3f
commit 4512962412
3 changed files with 30 additions and 6 deletions

View file

@ -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": [

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

View file

@ -0,0 +1,3 @@
// helper module to expose custom and vuelidate validators.
export * from 'vuelidate/lib/validators'
export * from './customValidators'