Skip to content

Commit

Permalink
update ux: safety valve date error
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfsayo committed Dec 8, 2024
1 parent ed5a63a commit 96a1e47
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ export const EscrowFormSchema = yup
.required('Safety valve date is required.')
.min(
new Date(Date.now() + 30 * 24 * 60 * 60 * 1000),
'Safety valve date must be at least 30 days from today.'
'Safety valve date must be at least 30 days from today or the last milestone whichever is later.'
)
.test(
'after-last-milestone',
'Safety valve date must be at least 30 days after the last milestone date',
'Safety valve date must be at least 30 days after the last milestone date.',
function (value) {
const milestones = (this.parent.milestones || []) as Milestone[]
if (milestones.length === 0) return true
Expand Down

0 comments on commit 96a1e47

Please sign in to comment.