fix: accept euro sign and dot thousands separators in amounts, clearer loan capital error

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
YugonitoandClaude Opus 5.5 committed 2026-10-27 21:31:44 +01:00
1 parent 4837a5cf22
commit c3c371aefe
4 files changed
+16 -4

No files matched your search

+1 -1
View File
@@ -60,7 +60,7 @@ describe("saveLoan", () => {
it("validates the rate and the capital", async () => {
expect(await saveLoan({ ...input, annualRate: "abc" }, TODAY)).toEqual({ ok: false, error: "Taux invalide." });
expect(await saveLoan({ ...input, principal: "0" }, TODAY)).toEqual({ ok: false, error: "Capital invalide." });
expect(await saveLoan({ ...input, principal: "0" }, TODAY)).toEqual({ ok: false, error: "Capital emprunté invalide (ex. 40000 ou 40 000,00)." });
});
});