The small participant invitation form should validate email on the server before sending an invitation and behave clearly after failed requests. After a recent change, the form became unstable: sometimes after an error it stops responding to input, and the submit button allows sending an address that does not match the last successful validation.
email field is validated when its value changes, with a small delay.email changes.submit is allowed only if there is a current successful validation result for the field’s current value.ChangeDetectionStrategy.OnPush and updates state via signal.broken@example.com.anna@example.com.anna@example.com and wait for the message that the address is available.anna@example.com or other@example.com.To run the test scenario, use:
npm install
npm run start
valueChanges stream.submit must not send an invitation based on stale successful validation state.20.0.0, standalone components, TypeScript 5.8.x, RxJS 7.8.xChangeDetectionStrategy.OnPush@angular/formsInviteApi.checkEmail(email) and returns Observable<{ ok: boolean; normalizedEmail?: string; reason?: string }>InviteApi.sendInvite(email) and returns Observable<{ sent: boolean }>broken@example.com -> network erroranna@example.com -> { ok: true, normalizedEmail: "anna@example.com" }taken@example.com -> { ok: false, reason: "Already registered" }Use line comments to explain the problem, its impact, the fix and how to test it.