import {Validator} from 'vee-validate';

Validator.localize('zh_CN');

Validator.extend('mobile', {
  getMessage(field, params, data) {
    return field + '必须是11位'
  },
  validate(value, args) {
    return value.length == 11 && /^((13|14|15|17|18)[0-9]{1}\d{8})$/.test(value)
  }
})
