movpushmov / effector-reform

MIT License
18 stars 2 forks source link

validatedAndSubmitted event is activated after user tried to submit and then fixed last validation error #14

Closed optislav closed 1 month ago

optislav commented 1 month ago
sample({
  clock: combineEvents([validated, submitted]),
  source: $values,
  fn: (values) => values,
  target: validatedAndSubmitted,
});
  1. User enter invalid data
  2. Clicked submit and see validation errors
  3. Trying to fix these errors, and when he fixes last issue, validatedAndSubmitted fired and send post request

But post request should only be sent on submit, not after validation fix