(schema, value, path)
| 622 | return errors |
| 623 | }, |
| 624 | dependencies (schema, value, path) { |
| 625 | const errors = [] |
| 626 | Object.entries(schema.dependencies).forEach(([i, dep]) => { |
| 627 | /* Doesn't need to meet the dependency */ |
| 628 | if (typeof value[i] === 'undefined') return |
| 629 | |
| 630 | /* Property dependency */ |
| 631 | if (Array.isArray(dep)) { |
| 632 | dep.forEach(d => { |
| 633 | if (typeof value[d] === 'undefined') { |
| 634 | errors.push({ |
| 635 | path, |
| 636 | property: 'dependencies', |
| 637 | message: this.translate('error_dependency', [d], schema) |
| 638 | }) |
| 639 | } |
| 640 | }) |
| 641 | /* Schema dependency */ |
| 642 | } else { |
| 643 | errors.push(...this._validateSchema(dep, value, path)) |
| 644 | } |
| 645 | }) |
| 646 | return errors |
| 647 | } |
| 648 | } |
| 649 | } |
| 650 |
nothing calls this directly
no test coverage detected