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.4.2 to 3.9.0 #3

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

SanteriMertakorpi
Copy link
Owner

snyk-top-banner

Snyk has created this PR to upgrade @hookform/resolvers from 3.4.2 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 5 versions ahead of your current version.

  • The recommended version was released on 2 months 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)
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:

@SanteriMertakorpi SanteriMertakorpi merged commit 4b654af into main Sep 19, 2024
2 checks passed
@SanteriMertakorpi SanteriMertakorpi deleted the snyk-upgrade-aa9ac411edc6e384d6949c3ddfe48c09 branch September 19, 2024 08:51
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