Skip to content

Conversation

@Saby-Bishops
Copy link
Member

fixes #9358

  • refactor custom validators to use Angular typed form control signatures and validation return types
  • document expected control value shapes and add guards for nullable values
  • ensure meetup time validator handles missing controls safely while maintaining logic

Codex Task

@Saby-Bishops Saby-Bishops marked this pull request as ready for review November 21, 2025 20:28
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 +253 to +255
static requiredMarkdown(ac: AbstractControl<{ text: string }>): ValidationErrors | null {
// Markdown editors provide a value object with a text property; coerce to a string control for reuse.
return CustomValidators.required(new FormControl<string | null>(ac.value?.text ?? ''));

Choose a reason for hiding this comment

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

P1 Badge Allow markdown validator to accept string values

Markdown form controls without an imageGroup emit plain strings (PlanetMarkdownTextbox defaults to a string when imageGroup is undefined), but requiredMarkdown now reads only ac.value?.text. For those controls (e.g., the team report dialog’s description markdown field), the validator always feeds '' into required, so even non-empty string content is marked {required: true} and the form stays invalid. The validator should fall back to the raw string value when no text property exists.

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.

src/app/validators/custom-validators.ts

2 participants