feat(vue): accept both . and , as decimal separator in OmegaForm number fields - #872
Merged
Merged
Conversation
…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.
@effect-app/cli
effect-app
@effect-app/eslint-codegen-model
@effect-app/eslint-shared-config
@effect-app/infra
@effect-app/vue
@effect-app/vue-components
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 explicitdecimal-separatorattr) by a capture-phasebeforeinputhandler, 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):
precisionis now forced tonull(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
٫, single-separator rule, cursor position, paste normalization)9.75into a comma field →9,75, model9.75;1,5into an int field → schema error shown on submit)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.