-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Validator] Add the format
option to the Ulid
constraint to allow accepting different ULID formats
#57438
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stof
reviewed
Jun 18, 2024
OskarStark
reviewed
Jun 18, 2024
src/Symfony/Component/Validator/Tests/Constraints/UlidValidatorTest.php
Outdated
Show resolved
Hide resolved
ec0c7c0
to
66e7a97
Compare
Ulid::VALIDATE_BASE_32
and Ulid::VALIDATE_BASE_58
to the Uuid
constraintUlid::FORMAT_BASE_32
and Ulid::FORMAT_BASE_58
to the Uuid
constraint
xabbuh
reviewed
Jun 18, 2024
xabbuh
reviewed
Jun 18, 2024
xabbuh
reviewed
Jun 18, 2024
66e7a97
to
5cfae91
Compare
Ulid::FORMAT_BASE_32
and Ulid::FORMAT_BASE_58
to the Uuid
constraintformat
option to the Uuid
constraint to allow accepting different ULID formats
5cfae91
to
f74a31c
Compare
xabbuh
reviewed
Jun 18, 2024
xabbuh
reviewed
Jun 18, 2024
febb9b7
to
f5e05a4
Compare
xabbuh
approved these changes
Jun 18, 2024
fabpot
approved these changes
Jun 18, 2024
format
option to the Uuid
constraint to allow accepting different ULID formatsformat
option to the Ulid
constraint to allow accepting different ULID formats
f5e05a4
to
8570e30
Compare
IIUC, this doesn't fix #57398, which is about allowing base58 UUIDs. Did I miss something? |
8570e30
to
f062117
Compare
That's right, I think I mixed up the issues. But I guess this opens up the way to accepting multiple formats in Uuid and Ulid constraints. I guess it would worth on or two follow-up PRs:
What do you think? |
Apparently there is a need for that yes :) |
… accepting different ULID formats
f062117
to
880e8fa
Compare
Thank you @alexandre-daubois. |
nicolas-grekas
added a commit
that referenced
this pull request
Aug 7, 2024
…d` constraint (alexandre-daubois) This PR was merged into the 7.2 branch. Discussion ---------- [Validator] Add support for RFC4122 format in the `Ulid` constraint | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | no | New feature? | yes | Deprecations? | no | Issues | Fix #51540 | License | MIT Related to #57438 (comment). I did not add new line in the CHANGELOG intentionally, I think the one added in #57438 is enough. Commits ------- 9382d71 [Validator] Add support for RFC4122 format in the `Ulid` constraint
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to #51540 and #57398