refactor: enforce semantic values and numeric lint rules

This commit is contained in:
2026-09-13 14:37:25 +03:00
parent 24d332e063
commit 53c852b437
21 changed files with 190 additions and 47 deletions
@@ -25,6 +25,8 @@ import classes from "./BankForms.module.css";
import { BankOperationIcon } from "./BankOperationIcon";
import { useBankFormFocus } from "./useBankFormFocus";
const MAX_CATEGORY_NAME_LENGTH = 80;
type CategoryManagerProps = {
onClose: () => void;
onCreated?: (id: string) => void;
@@ -67,7 +69,8 @@ const CategoryManager: FC<CategoryManagerProps> = (props) => {
.string()
.trim()
.refine(
(value) => value.length > 0 && value.length <= 80,
(value) =>
value.length > 0 && value.length <= MAX_CATEGORY_NAME_LENGTH,
validationMessage("bank.validation.category"),
)
.refine(