When apply validation in mxgraph take error message as a string

47 Views Asked by At
 if (mxCell.isEdge()) {
        const t = this.graph.getEdgeValidationError(
          mxCell,
          this.graph.getModel().getTerminal(mxCell, true),
          this.graph.getModel().getTerminal(mxCell, false)
        );
        console.log('error', t);
      }

In the mxgraph they show error message in the alert() function but I want to take this errors as a string I try this approach but this code block every time return null

 this.graph.multiplicities.push(
      new mxMultiplicity(true, 'Source', null, null, 1, 2, ['Target'], 'Source Must Have 1 or 2 Targets', 'Source Must Connect to Target')
    );

I added this multiplicity at the top of the file. I have take error message in the alert() function but I never see in my console

I added this multiplicity at the top of the file. I have take error message in the alert() function but I never see in my console

0

There are 0 best solutions below