fix: data type validation in accounts, users, contacts, vendors, customers, journals.

This commit is contained in:
Ahmed Bouhuolia
2020-11-29 17:51:40 +02:00
parent ba6a29579a
commit a4195069c7
9 changed files with 159 additions and 78 deletions

View File

@@ -73,7 +73,12 @@ export default class VendorsController extends ContactsController {
*/
get vendorDTOSchema(): ValidationChain[] {
return [
check('currency_code').optional().trim().escape(),
check('currency_code')
.optional()
.isString()
.trim()
.escape()
.isLength({ min: 3, max: 3 }),
];
}