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(text-validation) - pass only values that are strings #12

Merged
merged 12 commits into from
Jun 21, 2023

Conversation

gabrielseco
Copy link
Collaborator

@gabrielseco gabrielseco commented Jun 9, 2023

1. Description

Add a transform function to make the validation work when we're passing numbers or booleans to our text validation.

Screenshots

https://www.loom.com/share/b7a127623c5b41e78d6d3f2d21fcba59?focus_title=1&muted=1&from_recorder=1

Related Resources

2. Type of Change (select one)

  • Bug fix (non-breaking change that fixes an issue)

@gabrielseco gabrielseco self-assigned this Jun 9, 2023
src/yupSchema.js Outdated Show resolved Hide resolved
@gabrielseco gabrielseco requested a review from brennj June 19, 2023 17:57
src/yupSchema.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@brennj brennj left a comment

Choose a reason for hiding this comment

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

Overall going through the changes, it seems to make sense to me, great addition!

@@ -46,7 +47,7 @@
"dependencies": {
"lodash": "^4.17.21",
"randexp": "^0.5.3",
"yup": "^0.29.1"
"yup": "^0.30.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

todo: Just to make it clear, @gabrielseco and I had a huddle last week: Before we merge this PR, ideally we'd like our internal codebase to also use Yup 0.30 so we don't have Yup twice in our bundles.

Only then we'd merge this PR. WDYT @brennj?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Makes sense!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have a MR#17451 in our internal codebase.

My plan is to merge this PR and create a release, what do you think @sandrina-p?

After the release I'll update the MR in our internal codebase

Copy link
Collaborator

Choose a reason for hiding this comment

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

@gabrielseco , I'm answering your question here because Github doesn't support threads is comments detached from code.

I'll create a minor version because we're updating the yup version.
If it was only the fix probably, I'd do a patch.
What do you think @sandrina-p @brennj?

I agree!

@gabrielseco gabrielseco merged commit 00017c0 into main Jun 21, 2023
3 checks passed
@gabrielseco gabrielseco deleted the rmt-446-jsf-text-validation-is-incorrect branch June 21, 2023 11:05
@gabrielseco
Copy link
Collaborator Author

I'll create a minor version because we're updating the yup version.

If it was only the fix probably, I'd do a patch.

What do you think @sandrina-p @brennj?

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.

None yet

4 participants