ember-changeset-validations icon indicating copy to clipboard operation
ember-changeset-validations copied to clipboard

async validator is called multiple times with the same value

Open BryanCrotaz opened this issue 3 years ago • 2 comments

Start with an empty text input

Type a Async validator is called twice with a and a third time with a on blur

Type a second character b Async validator is called with ab and again with ab on blur

This scenario results in 5 calls for 2 changes - should only be called twice.

BryanCrotaz avatar Feb 09 '21 18:02 BryanCrotaz

Thanks @BryanCrotaz. Do you have a minimal repro I can play around with? I want to make sure the problem is on our side.

snewcomer avatar Feb 10 '21 01:02 snewcomer

async my-validate() { console.log("async called"); Await timeout(500); Return true; }

BryanCrotaz avatar Feb 10 '21 07:02 BryanCrotaz