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 3.0.0 to 3.0.1

dist/utils/promise-cancel/PromiseCancel.d.ts

10

dist/composable/useValidation.js
import { reactive, watch, ref } from 'vue';
import useUid from './useUid';
import Form from '../Form';
import { path } from '../utils';
import { path, PromiseCancel } from '../utils';
const isField = (field) => typeof field === 'object' ? '$value' in field : false;

@@ -95,2 +95,3 @@ const isTransformedField = (field) => typeof field === 'object'

const submitting = ref(false);
const promiseCancel = new PromiseCancel();
transformFormData(form, formData);

@@ -104,3 +105,3 @@ const transformedFormData = reactive(formData);

submitting.value = true;
const hasError = await form.validateAll();
const hasError = await promiseCancel.race(form.validateAll());
if (hasError) {

@@ -115,3 +116,6 @@ submitting.value = false;

},
resetFields() {
async resetFields() {
if (submitting.value) {
promiseCancel.cancelResolve(true);
}
form.resetFields();

@@ -118,0 +122,0 @@ },

export { trySet } from './map/trySet';
export { tryGet } from './map/tryGet';
export { path } from './path/path';
export { PromiseCancel } from './promise-cancel/PromiseCancel';
export { trySet } from './map/trySet';
export { tryGet } from './map/tryGet';
export { path } from './path/path';
export { PromiseCancel } from './promise-cancel/PromiseCancel';
{
"name": "vue3-form-validation",
"version": "3.0.0",
"version": "3.0.1",
"description": "Vue composition function for Form Validation",

@@ -11,3 +11,3 @@ "author": {

"type": "git",
"url": "https://github.com/JensDll/vue3-form-validation#readme"
"url": "https://github.com/JensDll/vue3-form-validation"
},

@@ -14,0 +14,0 @@ "main": "dist/index.js",

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