Skip to content

Conversation

SobiyaChainee
Copy link
Collaborator

@SobiyaChainee SobiyaChainee commented Aug 28, 2025

Description / Motivation

  • Prevents users from submitting the applications if fewer than 3 contributions are added.
  • Prevents users from adding more than 30 contributions.
  • Displaying appropriate error message and redirects to the Contributions page when validates fails.

How Has This Been Tested?

  • Manually tested submissions with 0,2,3 and more than 30 contributions.
  • Verified error messages appear correctly.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read the Contributing guide.
  • My code/comments/docs fully adhere to the Code of Conduct.
  • My change is a code change.
  • My change is a documentation change and there are NO other updates required.

#556

&& model.ContributionDate.Value >= model.CurrentSelection?.ApplicationsEnd.AddMonths(-_options.TimeFrameMonths)
&& model.ContributionDate.Value <= model.CurrentSelection.ApplicationsEnd)
{
if (model.CurrentApplication?.Contributions.Count >= 30)
Copy link
Member

Choose a reason for hiding this comment

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

Make this value configurable on a Sitecore Item

{
model.NextStep = ApplicationStep.Contributions;
await LoadProducts(model);
ModelState.AddModelError(string.Empty, "You have reached the limit of 30 contributions. Please review your list and select only top 30 contributions.");
Copy link
Member

Choose a reason for hiding this comment

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

Make this text content editable

{
if (model.CurrentApplication?.Contributions.Count < 3)
{
ModelState.AddModelError(string.Empty, "You must add atleast 3 contributions to submit your application.");
Copy link
Member

Choose a reason for hiding this comment

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

Make this text content editable

{
if (model.IsNavigation.HasValue && model.IsNavigation.Value)
{
if (model.CurrentApplication?.Contributions.Count < 3)
Copy link
Member

Choose a reason for hiding this comment

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

Make this value configurable on a Sitecore Item.

@robearlam robearlam closed this Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants