const checkIntro = (rule, value, callback) => {
  if (!value) {
    return callback(new Error("请填写馆藏介绍"));
  } else {
    callback();
  }
};

export const rules = {
  name: [{ required: true, message: "请输入文物名称", trigger: "blur" }],
  deptId: [{ required: true, message: "请填写馆藏单位", trigger: "change" }],
  intro: [{ required: true, validator: checkIntro, trigger: "blur" }],
};
