Feature/set validation rule to positive number in cash balance transfer (#2544)
* Add validation rule (positive number) * Update changelog
This commit is contained in:
parent
0af37ca1d7
commit
f5ad1d2d24
@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
- Improved the style and wording of the position detail dialog
|
- Improved the style and wording of the position detail dialog
|
||||||
- Improved the validation in the activities import (expects positive values for `fee`, `quantity` and `unitPrice`)
|
- Improved the validation in the activities import (expects positive values for `fee`, `quantity` and `unitPrice`)
|
||||||
|
- Improved the validation in the cash balance transfer from one to another account (expects a positive value)
|
||||||
- Changed the currency selector in the create or update account dialog to `@angular/material/autocomplete`
|
- Changed the currency selector in the create or update account dialog to `@angular/material/autocomplete`
|
||||||
- Upgraded `uuid` from version `9.0.0` to `9.0.1`
|
- Upgraded `uuid` from version `9.0.0` to `9.0.1`
|
||||||
- Upgraded `yahoo-finance2` from version `2.8.0` to `2.8.1`
|
- Upgraded `yahoo-finance2` from version `2.8.0` to `2.8.1`
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { IsNumber, IsString } from 'class-validator';
|
import { IsNumber, IsPositive, IsString } from 'class-validator';
|
||||||
|
|
||||||
export class TransferBalanceDto {
|
export class TransferBalanceDto {
|
||||||
@IsString()
|
@IsString()
|
||||||
@ -8,5 +8,6 @@ export class TransferBalanceDto {
|
|||||||
accountIdTo: string;
|
accountIdTo: string;
|
||||||
|
|
||||||
@IsNumber()
|
@IsNumber()
|
||||||
|
@IsPositive()
|
||||||
balance: number;
|
balance: number;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user