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

feat: change #toString() behaviour for arrays #1002

Merged

Conversation

fedeci
Copy link
Member

@fedeci fedeci commented Mar 2, 2021

Description

To-do list

  • I have added tests for what I changed.
  • This pull request is ready to merge.

@fedeci fedeci added this to the v7.0.0 milestone Mar 2, 2021
@coveralls
Copy link

coveralls commented Mar 2, 2021

Coverage Status

Coverage: 100.0%. Remained the same when pulling 7145fea on fedeci:v7/change-to-string into 93b3761 on express-validator:v7-features.

@fedeci fedeci requested a review from gustavohenke March 2, 2021 11:24
@fedeci fedeci mentioned this pull request Mar 2, 2021
9 tasks
Copy link
Member

@gustavohenke gustavohenke left a comment

Choose a reason for hiding this comment

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

This is great. Thanks!

src/context-items/standard-validation.spec.ts Outdated Show resolved Hide resolved
@gustavohenke
Copy link
Member

oops, just realised you didn't mark it as ready for review 😓

@fedeci
Copy link
Member Author

fedeci commented Mar 28, 2021

😁 I was still thinking about a few edge cases, but if they all pass I will just implement tests.

@gustavohenke
Copy link
Member

Any edge cases that you could think of? 🙂

@fedeci
Copy link
Member Author

fedeci commented Apr 17, 2021

Maybe wildcards and our custom validators for arrays.

@gustavohenke
Copy link
Member

taking this one over!

@gustavohenke gustavohenke force-pushed the v7/change-to-string branch 2 times, most recently from 347358a to 1384718 Compare December 28, 2022 14:09
@gustavohenke
Copy link
Member

Maybe wildcards and our custom validators for arrays.

To answer this:

  • wildcards automatically expand and end up running one by one anyway, e.g. foo.* becomes foo[0..N]
  • custom validators are, well, custom. They don't need toString.

@gustavohenke gustavohenke marked this pull request as ready for review December 28, 2022 14:31
@gustavohenke gustavohenke merged commit 8600fe0 into express-validator:v7-features Jan 1, 2023
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

3 participants