Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue3-form-validation

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue3-form-validation - npm Package Compare versions

Comparing version 4.0.3 to 4.0.4

dist/common/deep-copy/deep-copy.d.ts

6

dist/common/form-helper/get-result-form-data/getResultFormData.js
import { isReactive } from 'vue';
import { deepIterator } from '../../deep-iterator/deepIterator';
import { jsonCopy } from '../../json-copy/jsonCopy';
import { deepCopy } from '../../deep-copy/deep-copy';
import { set } from '../../set/set';

@@ -11,3 +11,3 @@ import { isTransformedField } from '../../type-guards/typeGuards';

if (isReactive(value.$value)) {
set(result, path, jsonCopy(value.$value));
set(result, path, deepCopy(value.$value));
}

@@ -20,3 +20,3 @@ else {

if (isReactive(value)) {
set(result, path, jsonCopy(value));
set(result, path, deepCopy(value));
}

@@ -23,0 +23,0 @@ else {

@@ -1,2 +0,2 @@

import { jsonCopy } from '../../json-copy/jsonCopy';
import { deepCopy } from '../../deep-copy/deep-copy';
import { isArray, isObject, isTransformedField } from '../../type-guards/typeGuards';

@@ -8,6 +8,6 @@ export function resetFields(formData, transformedFormData) {

if (isArray(transformedValue.$value)) {
transformedValue.$value = jsonCopy(value);
transformedValue.$value = deepCopy(value);
}
else if (isObject(transformedValue.$value)) {
const copy = jsonCopy(value);
const copy = deepCopy(value);
Object.assign(transformedValue.$value, copy);

@@ -14,0 +14,0 @@ }

import { computed, isReactive, isRef, reactive, ref, unref } from 'vue';
import { isArray, isObject, isDefined } from '../common';
import { jsonCopy } from '../common/json-copy/jsonCopy';
import { deepCopy } from '../common/deep-copy/deep-copy';
export class FormField {

@@ -15,11 +15,11 @@ constructor(name, modelValue, rules) {

this.modelValue = modelValue;
this._initialModelValue = jsonCopy(unref(modelValue));
this._initialModelValue = deepCopy(unref(modelValue));
}
else if (isObject(modelValue)) {
this.modelValue = reactive(modelValue);
this._initialModelValue = jsonCopy(this.modelValue);
this._initialModelValue = deepCopy(this.modelValue);
}
else {
this.modelValue = ref(modelValue);
this._initialModelValue = jsonCopy(unref(modelValue));
this._initialModelValue = deepCopy(unref(modelValue));
}

@@ -35,3 +35,3 @@ }

if (isArray(this.modelValue.value)) {
this.modelValue.value = jsonCopy(this._initialModelValue);
this.modelValue.value = deepCopy(this._initialModelValue);
}

@@ -43,3 +43,3 @@ else {

else {
const copy = jsonCopy(this._initialModelValue);
const copy = deepCopy(this._initialModelValue);
Object.assign(this.modelValue, copy);

@@ -46,0 +46,0 @@ }

{
"name": "vue3-form-validation",
"version": "4.0.3",
"version": "4.0.4",
"description": "Vue composition function for Form Validation",

@@ -5,0 +5,0 @@ "author": {

@@ -148,3 +148,3 @@ # Form Validation for Vue 3

- `names?` - Field names to validate.
- **Returns** - A `Promise` which will reject if there are validation errors, and resolve with the form data otherwise. Will throw `ValidationError` which you can compare against using `instanceof`.
- **Returns** - A `Promise` which will reject if there are validation errors, and resolve with the form data otherwise. The error in the rejected `Promise` will be of type `ValidationError`.
- `resetFields(formData?: object) -> void`

@@ -151,0 +151,0 @@ - **Description** - Reset all fields to their original value, or pass an object to set specific values.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc