{"size": 1019, "ext": "js", "max_stars_repo_path": "src/view/user/setting/ruleUpdate.js", "max_stars_repo_name": "aenuen/20311-full-admin", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/view/user/setting/ruleUpdate.js", "max_issues_repo_name": "aenuen/20311-full-admin", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/view/user/setting/ruleUpdate.js", "max_forks_repo_name": "aenuen/20311-full-admin", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 16.1746031746, "max_line_length": 53, "alphanum_fraction": 0.4867517174}
import { validateIntegral } from './validateIntegral'
import { validateRoles } from './validateRoles'

export const ruleUpdate = {
  nickname: [
    {
      required: true,
      message: '请输入用户昵称',
      trigger: 'blur'
    },
    {
      type: 'string',
      min: 4,
      message: '昵称长度至少为4位',
      trigger: 'change'
    },
    {
      type: 'string',
      max: 16,
      message: '昵称长度不能超过16位',
      trigger: 'change'
    }
  ],
  email: [
    {
      required: true,
      message: '请输入电子邮箱',
      trigger: 'blur'
    },
    {
      type: 'email',
      message: '请检查电子邮箱格式',
      trigger: 'change'
    }
  ],
  roles: [
    {
      validator: validateRoles,
      trigger: 'change'
    }
  ],
  password: [
    {
      type: 'string',
      min: 6,
      message: '密码长度至少为6位',
      trigger: 'change'
    },
    {
      type: 'string',
      max: 20,
      message: '密码长度不能超过20位',
      trigger: 'change'
    }
  ],
  integral: [
    {
      validator: validateIntegral,
      trigger: 'change'
    }
  ]
}
