Skip to content

Fixed Time Log validation to show all errors at once#365

Open
xrub1n wants to merge 1 commit intoRIT-Software-Engineering:devfrom
xrub1n:time-log-handleSubmit-bug
Open

Fixed Time Log validation to show all errors at once#365
xrub1n wants to merge 1 commit intoRIT-Software-Engineering:devfrom
xrub1n:time-log-handleSubmit-bug

Conversation

@xrub1n
Copy link
Copy Markdown

@xrub1n xrub1n commented Jan 21, 2026

Fix Time Log validation error handling to display all errors simultaneously

  • Changed error accumulation from using React state during validation to using a local array
  • Errors are now collected during the entire validation phase and set to state once at the end
  • This fixes the bug where only one error appeared per submit click and errors would disappear mysteriously
  • Errors now persist until the form is successfully submitted
  • Removed premature setError1([]) call that was causing stale state references due to closure

Fixes: Time Log form showing errors one at a time instead of all at once

@github-project-automation github-project-automation bot moved this to Needs Planning in Portal Development Jan 21, 2026
@xrub1n xrub1n changed the title Fixed Time Log validation to show all erros at once Fixed Time Log validation to show all errors at once Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Planning

Development

Successfully merging this pull request may close these issues.

1 participant