vue3-form-validation
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -21,9 +21,9 @@ import { Ref } from 'vue'; | ||
declare type ValidateFormData<T> = T extends unknown ? { | ||
[K in keyof T]: T[K] extends Field<infer TValue> ? Field<TValue> : T[K] extends Array<infer TArray> ? ValidateFormData<TArray>[] : never; | ||
[K in keyof T]: T[K] extends Field<infer TValue> ? Field<TValue> : T[K] extends Array<infer TArray> ? ValidateFormData<TArray>[] : T[K] extends Record<string, unknown> ? ValidateFormData<T[K]> : never; | ||
} : never; | ||
declare type TransformedFormData<T> = T extends unknown ? { | ||
[K in keyof T]: T[K] extends Field<infer TValue> ? TransformedField<TValue> : T[K] extends Array<infer TArray> ? TransformedFormData<TArray>[] : never; | ||
[K in keyof T]: T[K] extends Field<infer TValue> ? TransformedField<TValue> : T[K] extends Array<infer TArray> ? TransformedFormData<TArray>[] : T[K] extends Record<string, unknown> ? TransformedFormData<T[K]> : never; | ||
} : never; | ||
declare type FormData<T> = T extends unknown ? { | ||
[K in keyof T]: T[K] extends Field<infer TValue> ? TValue : T[K] extends Array<infer TArray> ? FormData<TArray>[] : never; | ||
[K in keyof T]: T[K] extends Field<infer TValue> ? TValue : T[K] extends Array<infer TArray> ? FormData<TArray>[] : T[K] extends Record<string, unknown> ? FormData<T[K]> : never; | ||
} : never; | ||
@@ -30,0 +30,0 @@ export declare const isSimpleRule: (rule: Rule) => rule is SimpleRule<any>; |
@@ -71,8 +71,6 @@ import { reactive, watch } from 'vue'; | ||
} | ||
if (Array.isArray(value) && value.length) { | ||
resultFormData[key] = {}; | ||
if (Array.isArray(value)) { | ||
resultFormData[key] = []; | ||
} | ||
if (!isNaN(key)) { | ||
resultFormData[key] = {}; | ||
} | ||
getResultFormData(value, resultFormData[key]); | ||
@@ -79,0 +77,0 @@ }); |
{ | ||
"name": "vue3-form-validation", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "Form validation for Vue 3", | ||
@@ -20,2 +20,8 @@ "author": { | ||
"license": "MIT", | ||
"keywords": [ | ||
"vue", | ||
"vuejs", | ||
"form", | ||
"validation" | ||
], | ||
"scripts": { | ||
@@ -34,3 +40,5 @@ "build": "npx tsc -p tsconfig.main.json", | ||
"eslint": "^7.13.0", | ||
"husky": "^4.3.0", | ||
"jest": "^26.6.3", | ||
"lint-staged": "^10.5.1", | ||
"prettier": "^2.1.2", | ||
@@ -49,3 +57,9 @@ "tailwindcss": "^1.9.6", | ||
"endOfLine": "crlf" | ||
}, | ||
"husky": { | ||
"hooks": {} | ||
}, | ||
"lint-staged": { | ||
"*.ts": "eslint --fix" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24894
16
409