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

fix: native validation with inputs array #329

Merged
merged 1 commit into from
Jan 18, 2022
Merged

Conversation

jorisre
Copy link
Member

@jorisre jorisre commented Jan 18, 2022

No description provided.

@jorisre jorisre requested a review from bluebill1049 January 18, 2022 11:13
@github-actions
Copy link
Contributor

github-actions bot commented Jan 18, 2022

Size Change: +146 B (+1%)

Total Size: 23.7 kB

Filename Size Change
dist/resolvers.js 362 B +49 B (+16%) ⚠️
dist/resolvers.module.js 375 B +50 B (+15%) ⚠️
dist/resolvers.umd.js 459 B +47 B (+11%) ⚠️
ℹ️ View Unchanged
Filename Size
class-validator/dist/class-validator.js 514 B
class-validator/dist/class-validator.modern.js 476 B
class-validator/dist/class-validator.module.js 539 B
class-validator/dist/class-validator.umd.js 617 B
computed-types/dist/computed-types.js 409 B
computed-types/dist/computed-types.modern.js 344 B
computed-types/dist/computed-types.module.js 424 B
computed-types/dist/computed-types.umd.js 503 B
io-ts/dist/io-ts.js 1.26 kB
io-ts/dist/io-ts.modern.js 1.1 kB
io-ts/dist/io-ts.module.js 1.14 kB
io-ts/dist/io-ts.umd.js 1.39 kB
joi/dist/joi.js 592 B
joi/dist/joi.modern.js 492 B
joi/dist/joi.module.js 610 B
joi/dist/joi.umd.js 698 B
nope/dist/nope.js 345 B
nope/dist/nope.modern.js 329 B
nope/dist/nope.module.js 365 B
nope/dist/nope.umd.js 434 B
superstruct/dist/superstruct.js 302 B
superstruct/dist/superstruct.modern.js 314 B
superstruct/dist/superstruct.module.js 319 B
superstruct/dist/superstruct.umd.js 404 B
typanion/dist/typanion.js 323 B
typanion/dist/typanion.modern.js 313 B
typanion/dist/typanion.module.js 336 B
typanion/dist/typanion.umd.js 418 B
vest/dist/vest.js 472 B
vest/dist/vest.modern.js 380 B
vest/dist/vest.module.js 436 B
vest/dist/vest.umd.js 562 B
yup/dist/yup.js 620 B
yup/dist/yup.modern.js 561 B
yup/dist/yup.module.js 634 B
yup/dist/yup.umd.js 723 B
zod/dist/zod.js 687 B
zod/dist/zod.modern.js 632 B
zod/dist/zod.module.js 704 B
zod/dist/zod.umd.js 789 B

compressed-size-action

@jorisre jorisre force-pushed the fix/native-validation-refs branch from 905fec0 to a69afcb Compare January 18, 2022 11:23
Copy link
Member

@bluebill1049 bluebill1049 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!


const setCustomValidity = (ref: Ref, fieldPath: string, errors: Record<string, FieldError>) => {
if (ref && 'reportValidity' in ref) {
const error = get(errors, fieldPath) as FieldError | undefined;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need the cast here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, get returns any

@jorisre jorisre merged commit 91f009b into master Jan 18, 2022
@jorisre jorisre deleted the fix/native-validation-refs branch January 18, 2022 11:29
@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.8.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants