import VeeValidate, { Validator } from 'vee-validate'
import zhCN from './vendor/zh_CN'

Validator.localize("zh_CN",zhCN)
Validator.extend('mobile', {
    messages: {
        zh_CN: field => field + '无效'
    },
    validate: value => {
        return value.length === 11 && /^((13|14|15|17|18)[0-9]{1}\d{8})$/.test(value)
    }
})

export default VeeValidate
