[edit: I rewrote this because it’s too verbose, but the question is the same]
Is there any way I can detect “manual” vs “automatic” validation from a ValidateEvent? The only thing I can seem to see is type: 'validate' | 'reset'
.
I’m subscribing to the event like this: this.controller.subscribe((event: ValidateEvent) => { ... });
I tried monkey-patching the ValidateInstruction like this: this.controller.validate({ object: this.model, noScroll: true } as ValidateInstruction);
- and this is passed through to ValidateEvent.instruction
, but normally I don’t even specify an object and it seems like a bit of a hack.
Am I missing something? The docs don’t give much (any?) detail on ValidateEvent. The validation guide only mentions the subscribe callback and says there’s more in the API docs but I can’t find anything in them.
Thanks!