Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added future DOB validation #648

Merged
merged 2 commits into from
Nov 12, 2024
Merged

added future DOB validation #648

merged 2 commits into from
Nov 12, 2024

Conversation

Mudiwa66
Copy link
Contributor

Users who enter a future date of birth will get the appropriate error message.

@Mudiwa66 Mudiwa66 requested a review from erikh360 November 12, 2024 08:38
Copy link
Contributor

@erikh360 erikh360 left a comment

Choose a reason for hiding this comment

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

Looks good just the one comment

if (!date.isBetween(current_date.clone().add(-2, "years"), current_date.add(1, "days")) ) {
return $(
"Unfortunately MomConnect doesn't send messages to children older " +
"than 2 years. Please try again by entering the day the baby was " +
"born as a number, e.g. 12."
);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This new indentation looks weird

Copy link
Contributor

Choose a reason for hiding this comment

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

Might just need to run npm test again

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should be okay now

@Mudiwa66 Mudiwa66 merged commit efd6b3e into develop Nov 12, 2024
2 checks passed
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