Skip to content

Commit

Permalink
feat(ui-ts): add rule for number value
Browse files Browse the repository at this point in the history
  • Loading branch information
skamril committed Oct 30, 2024
1 parent c0e7dba commit a7f3c64
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { useFormContextPlus } from "../../../../../common/Form";
import { TSFormFields, TSType } from "./utils";
import BooleanFE from "../../../../../common/fieldEditors/BooleanFE";
import { useTranslation } from "react-i18next";
import { validateNumber } from "@/utils/validation/number";

const borderStyle = "1px solid rgba(255, 255, 255, 0.12)";

Expand Down Expand Up @@ -89,6 +90,7 @@ function Fields() {
control={control}
size="small"
disabled={isReadyMade}
rules={{ validate: validateNumber({ min: 1 }) }}
sx={{ width: 110 }}
/>
</TableCell>
Expand Down

0 comments on commit a7f3c64

Please sign in to comment.