如何在 FormIO 中隐藏 alert-danger?

How to hide the alert-danger in FormIO?

我在 Angular 7 中使用 FormIO,如果无效,我不想在我的表单中显示包含 "Societe est obligatoire" 的警告危险(第一个)。

这是我在表格中声明的表格-io.component.ts

form= {
components: [
  {
      type: "textfield",
      input: true,
      tableView: true,
      inputType: "text",
      inputMask: "",
      label: "Societe",
      key: "societe",
      placeholder: "societe",
      multiple: false,
      defaultValue: "",
      protected: false,
      unique: false,
      persistent: true,
      validate: {
          required: true,
          minLength: 1,
          pattern: "",
          custom: "",
          customPrivate: false
      },
      conditional: {
          show: "",
          when: null,
          eq: ""
      }
  },
  {
    input:true,
    label:"Validate",
    tableView:false,
    key:"ValidateFournisseur",
    size:"md",
    block:false,
    action:"submit",
    disableOnInvalid:true,
    theme:"primary",
    type:"button",   
    hidden:false 
  } 

这是我的表格-io.component.html

<formio [form]="form"></formio>

有什么帮助吗?

对于那些仍在寻找答案的人

在你的 html

<formio [form]="form" [options]="options" ></formio>

在你的 ts 文件中

options: Object = {
  submitMessage: "",
  disableAlerts: true,
  noAlerts: true
}

希望对您有所帮助