POST Transaction from JSON is currently not validating the fields send.source.from and distribute.to. They should be validated to assure only one transaction type is being passed in the input. The fields to take in account:
amount
share
remaining
How to do it?
Create a custom Validator to validate when more than one of the fields listed above were informed, the API should return an error.
Context
POST Transaction from JSON is currently not validating the fields send.source.from and distribute.to. They should be validated to assure only one transaction type is being passed in the input. The fields to take in account:
How to do it?
Create a custom Validator to validate when more than one of the fields listed above were informed, the API should return an error.
Changes