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

@mutt/forms

Package Overview
Dependencies
Maintainers
7
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mutt/forms - npm Package Compare versions

Comparing version 2.0.2 to 2.2.1

2

package.json
{
"name": "@mutt/forms",
"version": "2.0.2",
"version": "2.2.1",
"license": "MIT",

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

@@ -161,5 +161,26 @@ /**

// Run each of the subfields' validators
Object.values(this.object).forEach(field => field.validate())
// Run this field's validators
if (this.validators.length > 0) {
for (const validator of this.validators) {
if (!validator.validate(this.value)) {
for (const [fieldName, error] of Object.entries(validator.error)) {
const field = this.object[fieldName]
// Add a field error whilst maintaining any existing ones
field.errors = error
// Re-render the widget to show the error
field.widget.refreshErrorState(field.errors)
}
}
}
}
// Make all of the subfields' errors available to this field
for (let key of Object.keys(this.object)) {
let field = this.object[key]
if (!field.validate()) {
if (field.errors.length) {
this._errors[key] = field.errors

@@ -166,0 +187,0 @@ valid = false

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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