@linktic/validator 1.1.1 → 1.1.2

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.
package/dist/index.cjs CHANGED
@@ -164,14 +164,14 @@ var FieldValidator = class {
164
164
  }
165
165
  arrayOf(itemType, message) {
166
166
  if (this.shouldSkip()) return this;
167
- if (!this.isEmpty) {
168
- if (!Array.isArray(this.value)) {
169
- this.addError(
170
- "array",
171
- ValidationMessages.array(this.fieldLabel)
172
- );
173
- return this;
174
- }
167
+ if (!Array.isArray(this.value)) {
168
+ this.addError(
169
+ "array",
170
+ ValidationMessages.array(this.fieldLabel)
171
+ );
172
+ return this;
173
+ }
174
+ if (this.value.length > 0) {
175
175
  const typeLabels = {
176
176
  string: "textos",
177
177
  number: "n\xFAmeros",
package/dist/index.js CHANGED
@@ -163,14 +163,14 @@ var FieldValidator = class {
163
163
  }
164
164
  arrayOf(itemType, message) {
165
165
  if (this.shouldSkip()) return this;
166
- if (!this.isEmpty) {
167
- if (!Array.isArray(this.value)) {
168
- this.addError(
169
- "array",
170
- ValidationMessages.array(this.fieldLabel)
171
- );
172
- return this;
173
- }
166
+ if (!Array.isArray(this.value)) {
167
+ this.addError(
168
+ "array",
169
+ ValidationMessages.array(this.fieldLabel)
170
+ );
171
+ return this;
172
+ }
173
+ if (this.value.length > 0) {
174
174
  const typeLabels = {
175
175
  string: "textos",
176
176
  number: "n\xFAmeros",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linktic/validator",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Framework-agnostic TypeScript validation library with fluent API and configurable Spanish default messages",
5
5
  "author": "LinkTIC",
6
6
  "license": "UNLICENSED",