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

@tanstack/form-core

Package Overview
Dependencies
Maintainers
2
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanstack/form-core - npm Package Compare versions

Comparing version 0.36.1 to 0.36.2

21

dist/esm/FieldApi.js

@@ -285,17 +285,7 @@ import { Store } from "@tanstack/store";

if (!this.state.meta.isTouched) return [];
let validationErrorFromForm = {};
let formValidationResultPromise = Promise.resolve({});
try {
const formValidationResult = this.form.validate(cause);
if (formValidationResult instanceof Promise) {
formValidationResultPromise = formValidationResult;
} else {
const fieldErrorFromForm = formValidationResult[this.name];
if (fieldErrorFromForm) {
validationErrorFromForm = fieldErrorFromForm;
}
}
} catch (_) {
}
const { hasErrored } = this.validateSync(cause, validationErrorFromForm);
const { fieldsErrorMap } = this.form.validateSync(cause);
const { hasErrored } = this.validateSync(
cause,
fieldsErrorMap[this.name] ?? {}
);
if (hasErrored && !this.options.asyncAlways) {

@@ -305,2 +295,3 @@ (_a = this.getInfo().validationMetaMap[getErrorMapKey(cause)]) == null ? void 0 : _a.lastAbortController.abort();

}
const formValidationResultPromise = this.form.validateAsync(cause);
return this.validateAsync(cause, formValidationResultPromise);

@@ -307,0 +298,0 @@ };

{
"name": "@tanstack/form-core",
"version": "0.36.1",
"version": "0.36.2",
"description": "Powerful, type-safe, framework agnostic forms.",

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

@@ -981,21 +981,8 @@ import { Store } from '@tanstack/store'

let validationErrorFromForm: ValidationErrorMap = {}
let formValidationResultPromise: Promise<
FieldsErrorMapFromValidator<TParentData>
> = Promise.resolve({})
try {
const formValidationResult = this.form.validate(cause)
if (formValidationResult instanceof Promise) {
formValidationResultPromise = formValidationResult
} else {
const fieldErrorFromForm = formValidationResult[this.name]
if (fieldErrorFromForm) {
validationErrorFromForm = fieldErrorFromForm
}
}
} catch (_) {}
// Attempt to sync validate first
const { hasErrored } = this.validateSync(cause, validationErrorFromForm)
const { fieldsErrorMap } = this.form.validateSync(cause)
const { hasErrored } = this.validateSync(
cause,
fieldsErrorMap[this.name] ?? {},
)

@@ -1008,3 +995,5 @@ if (hasErrored && !this.options.asyncAlways) {

}
// No error? Attempt async validation
const formValidationResultPromise = this.form.validateAsync(cause)
return this.validateAsync(cause, formValidationResultPromise)

@@ -1011,0 +1000,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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