Skip to content

Commit

Permalink
MAN-82 fix regex sonar exception
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-mills committed Jan 28, 2025
1 parent acd7315 commit e7870ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/middleware/validation/activityLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const activityLog: Route<void> = (req, res, next) => {
const { submit } = query

const isValidFormat = (date: string): boolean => {
const regex = /^(?:[1-9]?)?\d\/(?:[1-9]?)?\d\/\d{4}$/
const regex = /^(?:[1-9])?\d\/(?:[1-9])?\d\/\d{4}$/
return regex.test(date)
}

Expand Down

0 comments on commit e7870ec

Please sign in to comment.