Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Validator] Add Ulid constraint and validator#38322

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:masterfromlaurent35240:ulidValidator
Sep 29, 2020

Conversation

@laurent35240
Copy link
Contributor

QA
Branch?master
Bug fix?no
New feature?yes
Deprecations?no
TicketsFix#38152
LicenseMIT

ULID constraint and validator as mentioned in ticket#38103
I checked for it ulid specificationshttps://github.com/ulid/spec

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

Thnks, almost good to me.

->addViolation();
}

if (\strlen($value) !== strspn($value, '0123456789ABCDEFGHJKMNPQRSTVWXYZabcdefghjkmnpqrstvwxyz')) {

Choose a reason for hiding this comment

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

26 !== strspn([...]

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I think it makes more sense to keep\strlen($value) otherwise a too short ULID but with only valid characters will have violations about being too short AND having invalid characters.
The violation about invalid characters would not be true in this case.

Let me know what you think about it

@laurent35240
Copy link
ContributorAuthor

Everything modified except one part which I think makes more sense how it is right now (cf comment in code review)

@fabpot
Copy link
Member

Thank you@laurent35240.

laurent35240 reacted with thumbs up emoji

@fabpotfabpot merged commite159dff intosymfony:masterSep 29, 2020
@nicolas-grekasnicolas-grekas modified the milestones:next,5.2Oct 5, 2020
@fabpotfabpot mentioned this pull requestOct 5, 2020
OskarStark added a commit to symfony/symfony-docs that referenced this pull requestOct 6, 2020
…ent35240)This PR was merged into the 5.x branch.Discussion----------[Validator] Add documentation for ULID validatorResolves#14298Related to feature PRsymfony/symfony#38322Commits-------b37ca01 [Validator] Add documention for ULID validator
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

5.2

Development

Successfully merging this pull request may close these issues.

Add UuidValidator / UlidValidator

4 participants

@laurent35240@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp