chore: secure hooks and update dependencies #4 #9
Frontend security / security (push) Successful in 11s
Frontend verify / verify (push) Successful in 4m35s

This commit is contained in:
2026-09-13 19:36:15 +03:00
parent 7a89356f87
commit 3be6e61b8f
10 changed files with 899 additions and 841 deletions
@@ -44,14 +44,16 @@ type AccountIncomePageViewModel =
const datePattern = /^\d{4}-\d{2}-\d{2}$/;
const draftDate = z
.string()
.refine((value) => parseDraftDate(value) !== null, {
error: validationMessage("income.validation.date"),
})
.refine(
(value) => parseDraftDate(value) !== null,
validationMessage("income.validation.date"),
)
.refine((value) => {
const date = parseDraftDate(value);
return !date || date <= moscowDate(new Date());
}, validationMessage("income.validation.future"));
(value) => {
const date = parseDraftDate(value);
return !date || date <= moscowDate(new Date());
},
{ error: validationMessage("income.validation.future") },
);
const incomeFormSchema = z.object({ from: draftDate, to: draftDate }).refine(
({ from, to }) => {
const start = parseDraftDate(from);