Skip to content

Conversation

@Saby-Bishops
Copy link
Member

Summary

  • remove the notDateInFuture async validator from the shared validator service
  • drop future-date async validators from user profile and achievements forms and related injection usage

Testing

  • Not run (not requested)

Codex Task

@Saby-Bishops Saby-Bishops changed the title Remove future date validator usage deadcode: remove future date validator usage Dec 12, 2025
@Saby-Bishops Saby-Bishops marked this pull request as ready for review December 18, 2025 20:31
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 107 to 110
birthDate: [
'',
this.conditionalValidator(CustomValidators.dateValidRequired).bind(this),
ac => this.validatorService.notDateInFuture$(ac)
this.conditionalValidator(CustomValidators.dateValidRequired).bind(this)
],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep rejecting future birthdates

The async notDateInFuture$ guard was removed, so birthDate now only checks that a value exists (CustomValidators.dateValidRequired) and the datepicker only enforces a minimum of 1900. Entering a future date (e.g., 2099-01-01) now passes validation and is saved to CouchDB, which can produce negative ages and inconsistent profile data. The same removal occurs in health-update.component.ts and users-achievements-update.component.ts, leaving all birthdate forms without any upper-bound validation.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants