pwi-plata-type 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/libs/model.ts +2 -2
  2. package/package.json +1 -1
package/libs/model.ts CHANGED
@@ -100,7 +100,7 @@ export async function _validaModel(value: any, model: Model, name?: string): Pro
100
100
  if (t.length === undefined) {
101
101
  const m = new Model(t as ModelType)
102
102
 
103
- promises.push(_validaModel(value[campo], m, `${campo}.`))
103
+ promises.push(_validaModel(value[campo], m, `${name ?? ''}${campo}.`))
104
104
  continue
105
105
  }
106
106
 
@@ -463,7 +463,7 @@ export function VarChar(size: number): ModelValicacaoPrimitivo {
463
463
  return {
464
464
  error: {
465
465
  errorID: "BPVVARC001",
466
- msg: `O campo ${nome} tem que menos de ${nome} caracteres`
466
+ msg: `O campo ${nome} tem que menos de ${size} caracteres`
467
467
  },
468
468
  continua: false
469
469
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pwi-plata-type",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "main": "index.ts",
6
6
  "bin": {