Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snyk] Upgrade @hookform/resolvers from 3.3.4 to 3.9.0 #14

Merged
merged 1 commit into from
Aug 17, 2024

Conversation

zntb
Copy link
Owner

@zntb zntb commented Aug 16, 2024

snyk-top-banner

Snyk has created this PR to upgrade @hookform/resolvers from 3.3.4 to 3.9.0.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 8 versions ahead of your current version.

  • The recommended version was released on a month ago.

Release notes
Package name: @hookform/resolvers
  • 3.9.0 - 2024-07-05

    3.9.0 (2024-07-05)

    Features

    • fluentvalidation-ts: add fluentvalidation-ts resolver (#702) (5fc1e63)
    import { useForm } from 'react-hook-form';
    import { fluentValidationResolver } from '@ hookform/resolvers/fluentvalidation-ts';
    import { Validator } from 'fluentvalidation-ts';

    class FormDataValidator extends Validator<FormData> {
    constructor() {
    super();

    <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">ruleFor</span><span class="pl-kos">(</span><span class="pl-s">'username'</span><span class="pl-kos">)</span>
      <span class="pl-kos">.</span><span class="pl-en">notEmpty</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
      <span class="pl-kos">.</span><span class="pl-en">withMessage</span><span class="pl-kos">(</span><span class="pl-s">'username is a required field'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">ruleFor</span><span class="pl-kos">(</span><span class="pl-s">'password'</span><span class="pl-kos">)</span>
      <span class="pl-kos">.</span><span class="pl-en">notEmpty</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
      <span class="pl-kos">.</span><span class="pl-en">withMessage</span><span class="pl-kos">(</span><span class="pl-s">'password is a required field'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    

    }
    }

    const App = () => {
    const { register, handleSubmit } = useForm({
    resolver: fluentValidationResolver(new FormDataValidator()),
    });

    return (
    <form onSubmit={handleSubmit((d) => console.log(d))}>
    <input {...register('username')} />
    {errors.username && <span role="alert">{errors.username.message}</span>}
    <input {...register('password')} />
    {errors.password && <span role="alert">{errors.password.message}</span>}
    <button type="submit">submit</button>
    </form>
    );
    };




  • 3.8.0 - 2024-07-05

    3.8.0 (2024-07-05)

    Features

    • add typeschema resolver (#699) (18e423f), closes #693
    • typeboxResolver: make TypeBox resolver work with compiled schema (#674) (e8e0f80)
  • 3.7.0 - 2024-07-02

    3.7.0 (2024-07-02)

    Bug Fixes

    • zodResolver: cannot read properties of undefined (reading 'length') (a3e50c6)
    • chore: update valibot dependency to version >=0.33.0 (#695)

    Features

    import { useForm } from 'react-hook-form';
    import { vineResolver } from '@ hookform/resolvers/vine';
    import vine from '@ vinejs/vine';

    const schema = vine.compile(
    vine.object({
    username: vine.string().minLength(1),
    password: vine.string().minLength(1),
    }),
    );

    const App = () => {
    const { register, handleSubmit } = useForm({
    resolver: vineResolver(schema),
    });

    return (
    <form onSubmit={handleSubmit((d) => console.log(d))}>
    <input {...register('username')} />
    {errors.username && <span role="alert">{errors.username.message}</span>}
    <input {...register('password')} />
    {errors.password && <span role="alert">{errors.password.message}</span>}
    <button type="submit">submit</button>
    </form>
    );
    };




  • 3.6.0 - 2024-06-06

    3.6.0 (2024-06-06)

    Features

    • upgrade and migrate Valibot to v0.31.0 (#688) (bdd5ef5)
  • 3.5.0 - 2024-06-04

    3.5.0 (2024-06-04)

    Features

  • 3.4.2 - 2024-05-20

    3.4.2 (2024-05-20)

    Bug Fixes

    • move back to in-build set and remove lodash.set (#685) (5754c47)
  • 3.4.1 - 2024-05-20

    3.4.1 (2024-05-20)

    Bug Fixes

  • 3.4.0 - 2024-05-15

    3.4.0 (2024-05-15)

    Features

  • 3.3.4 - 2024-01-04

    3.3.4 (2024-01-04)

    Bug Fixes

    • error handling for array errors with root error (1bfc6ab)
from @hookform/resolvers GitHub release notes

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

Snyk has created this PR to upgrade @hookform/resolvers from 3.3.4 to 3.9.0.

See this package in npm:
@hookform/resolvers

See this project in Snyk:
https://app.snyk.io/org/zntb/project/3f7a23d2-a22c-4487-8442-502155814573?utm_source=github&utm_medium=referral&page=upgrade-pr
@zntb zntb merged commit 6057550 into main Aug 17, 2024
1 check passed
@zntb zntb deleted the snyk-upgrade-d6db17a66de09ca5f57cfb0ba0af5001 branch August 17, 2024 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when Trying to Use Arktype Resolver
2 participants