Skip to content

Commit

Permalink
fix: validation minimum for start date should be 4 months earlier, not 6
Browse files Browse the repository at this point in the history
  • Loading branch information
sirtawast committed Apr 3, 2024
1 parent bd08f18 commit 7b6313e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ export const getValidationSchema = (
.required(t(VALIDATION_MESSAGE_KEYS.REQUIRED))
.test({
message: t(VALIDATION_MESSAGE_KEYS.DATE_MIN, {
min: convertToUIDateFormat(subMonths(new Date(), 6)),
min: convertToUIDateFormat(subMonths(new Date(), 4)),
}),
test: (value = '') => validateDateWithinMonths(value, 6),
test: (value = '') => validateDateWithinMonths(value, 4),
}),
[APPLICATION_FIELDS_STEP2_KEYS.END_DATE]: Yup.string().required(
t(VALIDATION_MESSAGE_KEYS.REQUIRED)
Expand Down

0 comments on commit 7b6313e

Please sign in to comment.