Open rookie-luochao opened 1 month ago
@imolorhe please confirm this bug, thank you
Yes I can confirm it is still there. Looks like this isn't a bug but is intended? 🤔 cc @acao why do we not want to validate when the doc length is short? https://github.com/acao/codemirror-json-schema/blob/imolorhe/improve-completion/src/json-validation.ts#L131
imo an empty editor is also invalid but that should also be length of 0 after trimming 🤔
I think validation should be done when the document length is short, because it is easy for users to misunderstand that there is no difference between expanding and not expanding null map
monaco-editor will also prompt and verify when the map is not expanded,you can try it on monaco-editor. @imolorhe @acao
agreed on all of this, short documents should be validated, i think we should only check to avoid validating for an an empty string.
Maybe you need to verify it with the test schema data I gave you. It seems that this bug has not been solved. When you enter {}, the verification still cannot be triggered @acao @imolorhe
@rookie-luochao the issue i fixed was with the text document validation length, did that not solve your issue?
@rookie-luochao the issue i fixed was with the text document validation length, did that not solve your issue?
I saw your modification, but using the schema I provided, the same problem still occurs. {}
still cannot trigger validation, but { }
can trigger validation, and line breaks {}
can also trigger validation
Seems to have removed < 3
Fixes some issues, But not completely
my use schema:
associate #99, this bug has not been resolved, unable to reopen bug
when the schema has required fields, expect that both unexpanded or expanded {} can trigger verification