Validate an object for deprecated field usage.
This is useful for validation pipelines where you want to:
The OCF object type
The data to validate
Validation options
Validation result
const result = validateDeprecatedFields('StockPlan', { stock_class_id: 'sc-1', }, { treatAsError: false }); if (!result.valid) { console.error(result.errors.join('\n')); } else if (result.warnings.length > 0) { console.warn(result.warnings.join('\n')); } Copy
const result = validateDeprecatedFields('StockPlan', { stock_class_id: 'sc-1', }, { treatAsError: false }); if (!result.valid) { console.error(result.errors.join('\n')); } else if (result.warnings.length > 0) { console.warn(result.warnings.join('\n')); }
Validate an object for deprecated field usage.
This is useful for validation pipelines where you want to: