Skip to content

Commit

Permalink
Update valid.html
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-sapletta-com authored Jan 7, 2024
1 parent bd7ddb3 commit ae5110a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions valid.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,19 @@ <h1>Plik YAML</h1>
document.getElementById('yaml-content').textContent = error.message;
});
}
window.addEventListener('load', (event) => {




function validateYAML(data, schema) {
const ajv = new Ajv();
const validate = ajv.compile(schema);
const valid = validate(data);
if (!valid) console.error(validate.errors);
return valid;
}

window.addEventListener('load', (event) => {



});

Expand Down

0 comments on commit ae5110a

Please sign in to comment.