add 'blocking' prop to schema checks, allow a check in schema to skip the rest when it doesnt match expected value

indiachan-spamvector
Thomas Lynch 3 years ago
parent 943a1ba174
commit b10d305952
  1. 3
      helpers/schema.js

@ -61,6 +61,9 @@ module.exports = {
const expected = (check.expected || false);
if (result !== expected) {
errors.push(check.error);
if (check.blocking === true) {
break; //errors that you want to stop and not bother checking the rest
}
}
}
return errors;

Loading…
Cancel
Save