vue3-form-validation
Advanced tools
Comparing version 5.0.0-beta.5 to 5.0.0
@@ -161,21 +161,13 @@ 'use strict'; | ||
} | ||
nodesForwards() { | ||
*nodesForwards() { | ||
let node = this.first; | ||
return { | ||
*[Symbol.iterator]() { | ||
for (; node !== null; node = node.next) { | ||
yield node; | ||
} | ||
} | ||
}; | ||
for (; node !== null; node = node.next) { | ||
yield node; | ||
} | ||
} | ||
nodesBackwards() { | ||
*nodesBackwards() { | ||
let node = this.last; | ||
return { | ||
*[Symbol.iterator]() { | ||
for (; node !== null; node = node.prev) { | ||
yield node; | ||
} | ||
} | ||
}; | ||
for (; node !== null; node = node.prev) { | ||
yield node; | ||
} | ||
} | ||
@@ -944,9 +936,9 @@ } | ||
* | ||
* Vue composition function for Form validation. | ||
* Vue composition function for form validation. | ||
* | ||
* @remarks | ||
* For better type inference, consider defining the structure | ||
* of your `formData` upfront and pass it as the generic parameter `FormData`. | ||
* For type inference inside of `useValidation` you need to define the structure of your | ||
* `formData` upfront and pass it as the generic parameter `FormData`. | ||
* | ||
* @param formData - The structure of your Form data | ||
* @param formData - The structure of your `formData`. | ||
* | ||
@@ -953,0 +945,0 @@ * @example |
@@ -110,3 +110,3 @@ import { ComputedRef } from 'vue' | ||
* | ||
* List of rules to use for validation. | ||
* Rules to use for validation. | ||
*/ | ||
@@ -235,7 +235,3 @@ $rules?: FieldRule<TValue>[] | ||
dispose(): void | ||
shouldValidate( | ||
ruleNumber: number, | ||
force: boolean, | ||
submit: boolean | ||
): boolean | void | ||
shouldValidate(ruleNumber: number, force: boolean, submit: boolean): any | ||
private _setError | ||
@@ -263,3 +259,3 @@ } | ||
* | ||
* List of rules to use for validation. | ||
* Rules to use for validation. | ||
*/ | ||
@@ -290,3 +286,3 @@ $rules?: FieldRule<T, any[]>[] | undefined | ||
* | ||
* The field's error messages without `null` values. | ||
* A list of validation error messages local to the field without `null` values. | ||
*/ | ||
@@ -301,3 +297,3 @@ $errors: string[] | ||
* | ||
* `True` if this field has any error. | ||
* `True` while there are any errors on the field. | ||
*/ | ||
@@ -307,3 +303,3 @@ $hasError: boolean | ||
* | ||
* `True` if there is at least one async rule validating. | ||
* `True` while the field has any pending rules. | ||
*/ | ||
@@ -313,6 +309,6 @@ $validating: boolean | ||
* | ||
* `True` after this field was touched. | ||
* `True` if the field is touched. | ||
* | ||
* @remarks | ||
* In most cases, this value should be set together with the `blur` event. | ||
* In most cases, it should be set together with the `blur` event. | ||
* Either through `$validate` or manually. | ||
@@ -323,3 +319,3 @@ */ | ||
* | ||
* `True` after the `$value` property was changed at least once. | ||
* `True` if the `$value` of the field has changed at least once. | ||
*/ | ||
@@ -329,3 +325,3 @@ $dirty: boolean | ||
* | ||
* Validate this field. | ||
* Validate the field. | ||
* | ||
@@ -366,8 +362,4 @@ * @param options - Validation options to use | ||
removeLast(): void | ||
nodesForwards(): { | ||
[Symbol.iterator](): Generator<LinkedListNode<T>, void, unknown> | ||
} | ||
nodesBackwards(): { | ||
[Symbol.iterator](): Generator<LinkedListNode<T>, void, unknown> | ||
} | ||
nodesForwards(): Generator<LinkedListNode<T>, void, unknown> | ||
nodesBackwards(): Generator<LinkedListNode<T>, void, unknown> | ||
} | ||
@@ -524,3 +516,3 @@ | ||
* | ||
* The field's error messages without `null` values. | ||
* A list of validation error messages local to the field without `null` values. | ||
*/ | ||
@@ -535,3 +527,3 @@ $errors: string[] | ||
* | ||
* `True` if this field has any error. | ||
* `True` while there are any errors on the field. | ||
*/ | ||
@@ -541,3 +533,3 @@ $hasError: boolean | ||
* | ||
* `True` if there is at least one async rule validating. | ||
* `True` while the field has any pending rules. | ||
*/ | ||
@@ -547,6 +539,6 @@ $validating: boolean | ||
* | ||
* `True` after this field was touched. | ||
* `True` if the field is touched. | ||
* | ||
* @remarks | ||
* In most cases, this value should be set together with the `blur` event. | ||
* In most cases, it should be set together with the `blur` event. | ||
* Either through `$validate` or manually. | ||
@@ -557,3 +549,3 @@ */ | ||
* | ||
* `True` after the `$value` property was changed at least once. | ||
* `True` if the `$value` of the field has changed at least once. | ||
*/ | ||
@@ -563,3 +555,3 @@ $dirty: boolean | ||
* | ||
* Validate this field. | ||
* Validate the field. | ||
* | ||
@@ -632,3 +624,3 @@ * @param options - Validation options to use | ||
* | ||
* The reactive form data. | ||
* A transformed reactive `formData` object. | ||
*/ | ||
@@ -638,3 +630,3 @@ form: n_form.TransformedFormData<FormData> | ||
* | ||
* `True` after calling `validateFields` when there are async rules. | ||
* `True` during validation after calling `validateFields` when there were rules that returned a `Promise`. | ||
*/ | ||
@@ -644,3 +636,3 @@ submitting: Ref<boolean> | ||
* | ||
* `True` while there is at least one async rule validating. | ||
* `True` while the form has any pending rules. | ||
*/ | ||
@@ -650,3 +642,3 @@ validating: ComputedRef<boolean> | ||
* | ||
* `True` while there is at least one field that has an error. | ||
* `True` if the form has any error. | ||
*/ | ||
@@ -700,3 +692,3 @@ hasError: ComputedRef<boolean> | ||
* | ||
* @param formData - Form data to set specific values. It has the same structure as the object passed to `useValidation`. | ||
* @param formData - `FormData` to set specific values. It has the same structure as the object passed to `useValidation`. | ||
*/ | ||
@@ -706,3 +698,3 @@ resetFields(formData?: Partial<n_form.ResultFormData<FormData>>): void | ||
* | ||
* Adds one or more new properties to the form data. | ||
* Adds a new property to the form data. | ||
* | ||
@@ -723,5 +715,5 @@ * @remarks | ||
* | ||
* Removes one or more properties from the form data. | ||
* Removes a property from the form data. | ||
* | ||
* @param path - A path of `string` and `numbers` to the properties to remove | ||
* @param path - A path of `string` and `numbers` to the property to remove | ||
*/ | ||
@@ -733,9 +725,9 @@ remove(path: n_domain.Key[]): void | ||
* | ||
* Vue composition function for Form validation. | ||
* Vue composition function for form validation. | ||
* | ||
* @remarks | ||
* For better type inference, consider defining the structure | ||
* of your `formData` upfront and pass it as the generic parameter `FormData`. | ||
* For type inference inside of `useValidation` you need to define the structure of your | ||
* `formData` upfront and pass it as the generic parameter `FormData`. | ||
* | ||
* @param formData - The structure of your Form data | ||
* @param formData - The structure of your `formData`. | ||
* | ||
@@ -759,3 +751,3 @@ * @example | ||
* | ||
* Set this field touched when called. | ||
* Set the field touched when called. | ||
* | ||
@@ -785,3 +777,3 @@ * @default true | ||
* | ||
* `True` if the rule of this validation behavior has an error. | ||
* `True` if the paired rule of this behavior has an error. | ||
*/ | ||
@@ -791,3 +783,3 @@ hasError: boolean | ||
* | ||
* `True` if the field of this rule is touched. | ||
* The touched state of the field. | ||
*/ | ||
@@ -797,3 +789,3 @@ touched: boolean | ||
* | ||
* `True` if the field of this rule is dirty. | ||
* The dirty state of the field. | ||
*/ | ||
@@ -803,3 +795,3 @@ dirty: boolean | ||
* | ||
* `True` if the rule was called with the `force` flag. | ||
* `True` if the validation was triggered with the `force` flag. | ||
*/ | ||
@@ -809,3 +801,3 @@ force: boolean | ||
* | ||
* `True` if the rule was called with the `submit` flag. | ||
* `True` if the validation was triggered with the `submit` flag. | ||
*/ | ||
@@ -815,3 +807,3 @@ submit: boolean | ||
* | ||
* The field's `$value` property of this rule. | ||
* The `$value` of the field. | ||
*/ | ||
@@ -818,0 +810,0 @@ value: T |
@@ -157,21 +157,13 @@ import { isRef, unref, isReactive, ref, computed, reactive, watch, shallowReactive } from 'vue'; | ||
} | ||
nodesForwards() { | ||
*nodesForwards() { | ||
let node = this.first; | ||
return { | ||
*[Symbol.iterator]() { | ||
for (; node !== null; node = node.next) { | ||
yield node; | ||
} | ||
} | ||
}; | ||
for (; node !== null; node = node.next) { | ||
yield node; | ||
} | ||
} | ||
nodesBackwards() { | ||
*nodesBackwards() { | ||
let node = this.last; | ||
return { | ||
*[Symbol.iterator]() { | ||
for (; node !== null; node = node.prev) { | ||
yield node; | ||
} | ||
} | ||
}; | ||
for (; node !== null; node = node.prev) { | ||
yield node; | ||
} | ||
} | ||
@@ -940,9 +932,9 @@ } | ||
* | ||
* Vue composition function for Form validation. | ||
* Vue composition function for form validation. | ||
* | ||
* @remarks | ||
* For better type inference, consider defining the structure | ||
* of your `formData` upfront and pass it as the generic parameter `FormData`. | ||
* For type inference inside of `useValidation` you need to define the structure of your | ||
* `formData` upfront and pass it as the generic parameter `FormData`. | ||
* | ||
* @param formData - The structure of your Form data | ||
* @param formData - The structure of your `formData`. | ||
* | ||
@@ -949,0 +941,0 @@ * @example |
{ | ||
"name": "vue3-form-validation", | ||
"version": "5.0.0-beta.5", | ||
"version": "5.0.0", | ||
"description": "Vue composition function for Form validation", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -7,3 +7,3 @@ # Form Validation for Vue 3 | ||
Vue composition function for Form Validation with async rules. | ||
Vue composition function for Form validation and async rules support. | ||
@@ -10,0 +10,0 @@ - :milky_way: **Written in TypeScript** |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
92581
2790