You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcp-csc-ui/src/boot/vuelidate.js

12 lines
358 B

import { errorMessages } from 'src/validators'
export default ({ app }) => {
app.config.globalProperties.$errMsg = (v$) => {
if (v$ && v$.length) {
if (v$[0].$validator && errorMessages[v$[0].$validator]) {
return errorMessages[v$[0].$validator](v$[0].$params, v$[0])
}
}
return ''
}
}