Skip to content

Commit

Permalink
Add a form validation error message for out of bounds win dates
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgain committed Mar 5, 2024
1 parent 7c032a4 commit 633c5bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/client/modules/ExportWins/Form/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ export const validateTeamMembers = (team_members) =>
: null

export const validateWinDate = ({ month, year }) =>
!isDateWithinLastTwelveMonths(new Date(year, month - 1))
isDateWithinLastTwelveMonths(new Date(year, month - 1))
? null
: 'Date must be in the last 12 months'

0 comments on commit 633c5bc

Please sign in to comment.