Skip to content

fix: resolve crash when setting validation length on custom fields#482

Merged
johanohly merged 1 commit intomainfrom
fix/custom-field-validation-trim
Feb 23, 2026
Merged

fix: resolve crash when setting validation length on custom fields#482
johanohly merged 1 commit intomainfrom
fix/custom-field-validation-trim

Conversation

@johanohly
Copy link
Owner

@johanohly johanohly commented Feb 23, 2026

Fixes #481


Summary by cubic

Fixes a crash when setting min/max length on custom fields by safely parsing numeric inputs during validation.

  • Bug Fixes
    • Updated parseFinite to accept string | number and convert to string before trimming, preventing "trim is not a function" errors from number inputs.

Written for commit 51a0fcd. Summary will update on new commits.

Svelte's bind:value on <input type="number"> coerces the bound value
to a number at runtime, causing .trim() to fail with 'not a function'
when saving a custom field with min/max length set.
@sonarqubecloud
Copy link

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@johanohly johanohly merged commit a879c09 into main Feb 23, 2026
10 of 11 checks passed
@johanohly johanohly deleted the fix/custom-field-validation-trim branch February 23, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to Add New Custom Field

1 participant