Skip to content
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

Modify the JsonEditorOptions to prevent type validation? #61

Open
bluelbow opened this issue Feb 26, 2020 · 6 comments
Open

Modify the JsonEditorOptions to prevent type validation? #61

bluelbow opened this issue Feb 26, 2020 · 6 comments
Labels
question Further information is requested

Comments

@bluelbow
Copy link

Is there a way to modify the JsonEditorOptions to prevent type validation? I would like the editor to treat the "value" only as string, is it possible? The editor interprets a string value that is starting by "0" as a number and prevent me from having a leading 0.

Thanks for your help and for the Editor! It's appreciated.

@mariohmol
Copy link
Owner

What you mean? can u give one example?

@bluelbow
Copy link
Author

bluelbow commented May 7, 2020

Hi, I encountered 2 situations.

  1. I have a filed called "TIMESTAMP" and it is a date in a string format. I would be happy if all the field were interpreted as string. But it is validated as a date, but the date doesn't fit (see screenshot)
    date_error.
  2. We have a field that looks like this 412340, However, to us, it's as string. So when we try to add a leading 0, it doesn't take it.

In short, I wanted to know if it would be possible for all the field to be interpret as strings.

Thanks.

@mariohmol
Copy link
Owner

I see... I think that's an issue that it's related to the jsoneditor

Maybe this docs can help you, like setting a schema to your editor

https://github.com/josdejong/jsoneditor/blob/master/examples/07_json_schema_validation.html

@mariohmol mariohmol added the question Further information is requested label May 7, 2020
@mariohmol
Copy link
Owner

This might help you #63 (comment)

@bluelbow
Copy link
Author

bluelbow commented May 8, 2020

Thank you. I will try it.

@mariohmol
Copy link
Owner

cool.. if doesnt work u can reopen

@mariohmol mariohmol reopened this May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants