Custom rules change styles of connection arrow

Is there any way to change connection arrow styles based on validation during drop (maybe someheow in customRules)?

Or change how connection arrow is looking based on validation

That is currently not possible, sorry. If something is a sequence flow it will always be rendered as a sequence flow.

So something like this is impossible(i saw something like this on forum)?

CustomRules.prototype.init = function() {
  function canConnect(source, target) {
      if (*some validation is ok*) {
        return { type: 'bpmn:SequenceFlowCustom' };
      } else {
        return true;
      }
  }

  this.addRule('connection.create', HIGH_PRIORITY, function(context) {
    let source = context.source,
      target = context.target;

    return canConnect(source, target);
  });
};

Or somehow set/add an attribute value to sequence flow on custom rule.

Its about scenario: I want to validate something and when if it fail/success set another color to the arrow on diagram.

We’re using global styles for drop-not-ok indicators. It is not possible to validate rules during drop and recolor accordingly, no.