Skip to content

feat(vue): accept both . and , as decimal separator in OmegaForm number fields - #872

Merged
MakhBeth merged 1 commit into
mainfrom
feat/number-input-dual-decimal-separator
Aug 21, 2026
Merged

feat(vue): accept both . and , as decimal separator in OmegaForm number fields#872
MakhBeth merged 1 commit into
mainfrom
feat/number-input-dual-decimal-separator

Conversation

@MakhBeth

@MakhBeth MakhBeth commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

What

OmegaForm number fields (Vuetify 4 VNumberInput) now accept both . and , while typing: the non-active separator is translated to the active one (locale-driven, or an explicit decimal-separator attr) by a capture-phase beforeinput handler, instead of being silently rejected by Vuetify's input filter.

Design note

Follows the OmegaForm principle of showing errors instead of preventing them (same reasoning as min/max not being passed as props): precision is now forced to null (Vuetify defaults to 0), so typing a decimal into an int field goes through and shows the schema validation error rather than being silently blocked.

Testing

  • 8 unit tests for the handler (translation both ways, custom locale separators like ٫, single-separator rule, cursor position, paste normalization)
  • Full suite 204/204 green; verified live in Storybook (typed 9.75 into a comma field → 9,75, model 9.75; 1,5 into an int field → schema error shown on submit)
  • Reviewed via codex review chat (approved)

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

…er fields

Typing the non-active separator in a VNumberInput-backed field is translated
to the active one (locale-driven or explicit decimal-separator attr) via a
capture-phase beforeinput handler, instead of being silently rejected.

Also stop passing precision 0 for int fields: like min/max, nothing is
silently blocked while typing; out-of-schema values go through and the
schema validation error is shown.
@pkg-pr-new

pkg-pr-new Bot commented Aug 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

@effect-app/cli

npm i https://pkg.pr.new/effect-app/libs/@effect-app/cli@872

effect-app

npm i https://pkg.pr.new/effect-app/libs/effect-app@872

@effect-app/eslint-codegen-model

npm i https://pkg.pr.new/effect-app/libs/@effect-app/eslint-codegen-model@872

@effect-app/eslint-shared-config

npm i https://pkg.pr.new/effect-app/libs/@effect-app/eslint-shared-config@872

@effect-app/infra

npm i https://pkg.pr.new/effect-app/libs/@effect-app/infra@872

@effect-app/vue

npm i https://pkg.pr.new/effect-app/libs/@effect-app/vue@872

@effect-app/vue-components

npm i https://pkg.pr.new/effect-app/libs/@effect-app/vue-components@872

commit: 7ef7896

@MakhBeth
MakhBeth merged commit 9d015d8 into main Aug 21, 2026
6 checks passed
@MakhBeth
MakhBeth deleted the feat/number-input-dual-decimal-separator branch August 21, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant