Skip to content

Commit

Permalink
fix(cockpit): fix fast-xml-parser usage (camunda#3502)
Browse files Browse the repository at this point in the history
related to camunda#3501
  • Loading branch information
tasso94 authored Jun 26, 2023
1 parent 66f2e64 commit 5af6d96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions webapps/frontend/camunda-bpm-sdk-js/lib/forms/type-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ var BOOLEAN_PATTERN = /^(true|false)$/;

var DATE_PATTERN = /^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(|\.[0-9]{0,4})$/;

var xmlParser = require('fast-xml-parser');
var {validate} = require('fast-xml-parser/src/validator');

var isValidXML = function(value) {
return value ? xmlParser.validate(value) : false;
if (!value) return false;
return validate(value) === true;
};

var isValidJSON = function(value) {
Expand Down

0 comments on commit 5af6d96

Please sign in to comment.