pwi-plata-type 0.1.3 → 0.1.4

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
@@ -306,7 +306,7 @@ export function Int(): ModelValicacaoPrimitivo {
306
306
 
307
307
  export function isArray(tamanhoMaximo?: number): ModelValicacaoPrimitivo {
308
308
  return async (nome: string, valor: any) => {
309
- if (valor === undefined) {
309
+ if (valor === null) {
310
310
  return {
311
311
  error: {
312
312
  errorID: "BPCVARR001",
@@ -354,7 +354,7 @@ export function Optional(): ModelValicacaoPrimitivo {
354
354
 
355
355
  export function Required(): ModelValicacaoPrimitivo {
356
356
  return async (nome: string, valor: any) => {
357
- if (valor === undefined) {
357
+ if (valor === null) {
358
358
  return {
359
359
  error: {
360
360
  errorID: "BPCVREQ001",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pwi-plata-type",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "main": "index.ts",
6
6
  "bin": {