@juantroconisf/lib 4.1.3 → 4.2.0

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.js CHANGED
@@ -161,6 +161,7 @@ function useValidate() {
161
161
  if (value === "" && !isRequired) return validProps;
162
162
  let errorFound = validProps;
163
163
  for (const [key, opts] of items) {
164
+ if (opts === null) continue;
164
165
  const { validate, msg } = errors[key], isInvalid = !validate(value, opts);
165
166
  if (isInvalid) {
166
167
  errorFound = {
package/dist/index.mjs CHANGED
@@ -142,6 +142,7 @@ function useValidate() {
142
142
  if (value === "" && !isRequired) return validProps;
143
143
  let errorFound = validProps;
144
144
  for (const [key, opts] of items) {
145
+ if (opts === null) continue;
145
146
  const { validate, msg } = errors[key], isInvalid = !validate(value, opts);
146
147
  if (isInvalid) {
147
148
  errorFound = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juantroconisf/lib",
3
- "version": "4.1.3",
3
+ "version": "4.2.0",
4
4
  "description": "A form validation library for HeroUI.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",