Socket
Socket
Sign inDemoInstall

@mantine/form

Package Overview
Dependencies
Maintainers
1
Versions
217
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mantine/form - npm Package Compare versions

Comparing version 5.10.2 to 5.10.3

3

cjs/resolvers/zod-resolver/zod-resolver.js

@@ -6,5 +6,4 @@ 'use strict';

function zodResolver(schema) {
const _schema = schema;
return (values) => {
const parsed = _schema.safeParse(values);
const parsed = schema.safeParse(values);
if (parsed.success) {

@@ -11,0 +10,0 @@ return {};

@@ -8,3 +8,3 @@ 'use strict';

function isEmail(error) {
return matches.matches(/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/, error);
return matches.matches(/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,63})+$/, error);
}

@@ -11,0 +11,0 @@

function zodResolver(schema) {
const _schema = schema;
return (values) => {
const parsed = _schema.safeParse(values);
const parsed = schema.safeParse(values);
if (parsed.success) {

@@ -6,0 +5,0 @@ return {};

import { matches } from '../matches/matches.js';
function isEmail(error) {
return matches(/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/, error);
return matches(/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,63})+$/, error);
}

@@ -6,0 +6,0 @@

import type { FormErrors } from '../../types';
export declare function zodResolver<T extends Record<string, any>>(schema: any): (values: T) => FormErrors;
interface ZodError {
path: (string | number)[];
message: string;
}
interface ZodParseSuccess {
success: true;
}
interface ZodParseError {
success: false;
error: {
errors: ZodError[];
};
}
interface ZodSchema<T extends Record<string, any>> {
safeParse(values: T): ZodParseSuccess | ZodParseError;
}
export declare function zodResolver<T extends Record<string, any>>(schema: ZodSchema<T>): (values: T) => FormErrors;
export {};
//# sourceMappingURL=zod-resolver.d.ts.map

@@ -41,2 +41,3 @@ /// <reference types="react" />

onFocus?: any;
onBlur?: any;
};

@@ -43,0 +44,0 @@ export type SetFieldValue<Values> = <Field extends LooseKeys<Values>>(path: Field, value: Field extends keyof Values ? Values[Field] : unknown) => void;

{
"name": "@mantine/form",
"description": "Mantine form management library",
"version": "5.10.2",
"version": "5.10.3",
"main": "cjs/index.js",

@@ -6,0 +6,0 @@ "module": "esm/index.js",

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

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