@quickflo/quickforms-vue 1.0.3 → 1.1.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.
@@ -1 +1 @@
1
- {"version":3,"file":"useFormField.d.ts","sourceRoot":"","sources":["../../src/composables/useFormField.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAoDvD;;GAEG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,UAAU,EAClB,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO;;;;;;;;;;;EAqRjC"}
1
+ {"version":3,"file":"useFormField.d.ts","sourceRoot":"","sources":["../../src/composables/useFormField.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAoDvD;;GAEG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,UAAU,EAClB,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO;;;;;;;;;;;EA2RjC"}
package/dist/index.js CHANGED
@@ -4962,30 +4962,32 @@ function Ee(e, t, r = {}) {
4962
4962
  "required",
4963
4963
  `${t.title || e} is required`
4964
4964
  );
4965
- if (q == null || q === "")
4966
- return !0;
4967
- if (t.type === "string" && typeof q == "string") {
4968
- if (t.minLength !== void 0 && q.length < t.minLength)
4965
+ if (t.type === "string") {
4966
+ if (t.minLength !== void 0 && typeof q == "string" && q.length < t.minLength)
4969
4967
  return d(
4970
4968
  "minLength",
4971
4969
  `Must be at least ${t.minLength} characters`
4972
4970
  );
4973
- if (t.maxLength !== void 0 && q.length > t.maxLength)
4974
- return d(
4975
- "maxLength",
4976
- `Must be at most ${t.maxLength} characters`
4977
- );
4978
- if (t.pattern)
4979
- try {
4980
- if (!new RegExp(t.pattern).test(q))
4981
- return d("pattern", "Invalid format");
4982
- } catch {
4983
- console.warn("Invalid regex pattern:", t.pattern);
4984
- }
4985
- if (t.format === "email" && !cc(q))
4986
- return d("format", "Invalid email address");
4987
- if ((t.format === "url" || t.format === "uri") && !uc(q))
4988
- return d("format", "Invalid URL");
4971
+ if (q == null || q === "")
4972
+ return !0;
4973
+ if (typeof q == "string") {
4974
+ if (t.maxLength !== void 0 && q.length > t.maxLength)
4975
+ return d(
4976
+ "maxLength",
4977
+ `Must be at most ${t.maxLength} characters`
4978
+ );
4979
+ if (t.pattern)
4980
+ try {
4981
+ if (!new RegExp(t.pattern).test(q))
4982
+ return d("pattern", "Invalid format");
4983
+ } catch {
4984
+ console.warn("Invalid regex pattern:", t.pattern);
4985
+ }
4986
+ if (t.format === "email" && !cc(q))
4987
+ return d("format", "Invalid email address");
4988
+ if ((t.format === "url" || t.format === "uri") && !uc(q))
4989
+ return d("format", "Invalid URL");
4990
+ }
4989
4991
  }
4990
4992
  if ((t.type === "number" || t.type === "integer") && q !== "") {
4991
4993
  const z = Number(q);
@@ -5045,8 +5047,9 @@ function Ee(e, t, r = {}) {
5045
5047
  s === "NoValidation" ? void 0 : w,
5046
5048
  {
5047
5049
  validateOnValueUpdate: !0,
5048
- // Always validate on update for custom validators
5050
+ // Always validate on update
5049
5051
  validateOnMount: !1
5052
+ // Note: VeeValidate will still validate, we just control when errors are displayed
5050
5053
  }
5051
5054
  ), S = J(() => r.label !== void 0 ? r.label : t.title || e), E = J(() => {
5052
5055
  const q = dc(t);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quickflo/quickforms-vue",
3
- "version": "1.0.3",
3
+ "version": "1.1.0",
4
4
  "description": "Vue 3 bindings for QuickForms - JSON Schema form generator",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "vee-validate": "^4.12.0",
33
- "@quickflo/quickforms": "1.0.3"
33
+ "@quickflo/quickforms": "1.1.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^20.0.0",