Skip to content

Version 2.6.0

Compare
Choose a tag to compare
@errietta errietta released this 02 Jul 20:32
· 70 commits to master since this release

Transaction validator

You can now validate that an object matches the Transaction API.

import { transaction_validator } from '@hyperbudget/hyperbudget-core';
let errors = transaction_validator.validate_transaction(txn);
expect(errors).to.deep.equal([]); // no errors
// or
expect(errors).to.deep.equal([ 'transaction.txn_date', 'transaction.org_month', 'fields_with_errors']);