Closed brunogenaro closed 1 year ago
I was able to get around this by modifying the locale when I have a custom error message that doesn't include line numbers:
locale={customError ? {...locale, format: "{reason}"} : locale}
I no longer intend to update this project. I am working instead on a complete rewrite.
I'd like to thank you for using and taking interest in this project.
I also would like to apologize for not following up sooner. However, do realize for the most part this has been a one-man show, and the occasional contributions I used to receive. What I am saying is, I am in dire need of volunteers.
If this is something you would be interested in participating in, you can join in the discussion.
I've taken note of this thread, and I'll keep this under consideration for the new project.
What version of RJEA are you using (react-json-editor-ajrm version)? 2.5.13
What operating system and processor architecture are you using? macOS Big Sur V11.5.1
What did you do? * I'm doing an external JSON schema validation and providing the
error.reason
to the Component. Even though I don't send theerror.line
, is still showing as "at line null". So to be less weird, now I'm sending error.line as 0. (as you can see below)What did you expect to see? If
error.line
is not provided (or provided as null, undefined, 0, false) I'd expect to see:{error.reason}
(Reference: https://github.com/AndrewRedican/react-json-editor-ajrm/blob/master/src/locale/en.js#L2)
{reason} at line {line}