-
-
Notifications
You must be signed in to change notification settings - Fork 332
Open
Labels
PendingPending to be confirmed by user/author for some check/update/implementationPending to be confirmed by user/author for some check/update/implementation
Description
- [ X ] Are you running the latest version?
- [ X ] Have you included sample input, output, error, and expected output?
- [ X ] Have you checked if you are using correct configuration?
- [ X ] Did you try online tool? (getting the same error when parsing, the validation of the online tool outputs "Output")
Description
A closing tag that hasn't been opened causes an exception to be thrown, instead of returning a validation error (as would be expected)
Code
import { XMLValidator } from "fast-xml-parser";
// This throws an exception
XMLValidator.validate("<Document>some text</Document></badTag>");
Output
Exception thrown:
TypeError: Cannot read properties of undefined (reading 'tagName')
at exports.validate (/home/guillermoheras/lhv/banking-services/apps/portal/node_modules/fast-xml-parser/src/validator.js:108:33)
expected data
a ValidationError object should be returned
Would you like to work on this issue?
- Yes
- No
Bookmark this repository for further updates. Visit SoloThought to know about recent features.
Metadata
Metadata
Assignees
Labels
PendingPending to be confirmed by user/author for some check/update/implementationPending to be confirmed by user/author for some check/update/implementation