-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent validation for string type fields. #1541
Comments
In your screenshot, |
Thanks for the prompt reply!
Ok. It was set to Auto, is there a way for me through the API to automatically set that? I don't want users to have to worry about.
Steig
…________________________________
From: Jos de Jong ***@***.***>
Sent: Thursday, July 27, 2023 12:07 PM
To: josdejong/jsoneditor ***@***.***>
Cc: Hallquist, Steig ***@***.***>; Author ***@***.***>
Subject: [External] - Re: [josdejong/jsoneditor] Inconsistent validation for string type fields. (Issue #1541)
CAUTION: External email.
________________________________
In your screenshot, os_minorversion has a number 5 as value (colored red), and os_version is a string with value "7" (colored green). You can change between number/string via the context menu, type, auto or string.
—
Reply to this email directly, view it on GitHub<#1541 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AU6OD4R6SN6WGW6T6YICL23XSKG25ANCNFSM6AAAAAA22CFC2Y>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
This communication, including any attachments, may contain Proprietary, Export Controlled, Legally Privileged or other Confidential Information. Any unauthorized review, printing, copying, transmission, dissemination, or use of the information is strictly prohibited. If you are not the intended recipient, please indicate to the sender that you have received this email in error, and delete the copy you received.
|
It just displays what you provide it. The editor normally loads values with "auto" mode. There is only one case where it sets the value type to string and keeps it like that (until you manually change the type): when a value is a string containing a numeric value. So if you load the following example: {
"os_version": "7"
} the value of In the following example, the type is {
"os_version": 7
} |
I have multiple fields where the type is defined as: [string, null] some fields will allow a integer value whereas other will show a warning. For example, I have two fields defined as:
Os Version doesn't show a warning when entering an integer, however, Os Minorversion will.
I'm using jsoneditor v9.10.2 within an Angular v14.3.0 project.
I've tried rolling back all the way to jsoneditor v9.7.4, but this issue still persists.
The text was updated successfully, but these errors were encountered: