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] AddMacAddress constraint for validating MAC address#51862

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
nicolas-grekas merged 1 commit intosymfony:7.1fromNinos:constraints-mac
Jan 2, 2024
Merged

[Validator] AddMacAddress constraint for validating MAC address#51862

nicolas-grekas merged 1 commit intosymfony:7.1fromNinos:constraints-mac
Jan 2, 2024

Conversation

@Ninos
Copy link
Contributor

@NinosNinos commentedOct 6, 2023
edited by OskarStark
Loading

QA
Branch?7.1
Bug fix?no
New feature?yes
Deprecations?no
LicenseMIT

Possibility to validate against mac address.

See also past discussion:#51777

andreybolonin reacted with thumbs up emoji
@OskarStark
Copy link
Contributor

What about renaming it toMacAddress?

geekabel and andreybolonin reacted with thumbs up emoji

@OskarStarkOskarStark changed the title[Validator] AddMac constraint for validating mac address[Validator] AddMac constraint for validating MAC addressOct 6, 2023
@Ninos
Copy link
ContributorAuthor

What about renaming it toMacAddress?

For meMac was cleaner, because theIp constraint is not calledIpAddress (consistency) & there are no different meanings of the wordmac, so no conflicts

OskarStark reacted with thumbs up emoji

@derrabus
Copy link
Member

there are no different meanings of the wordmac

I see what you did there. 🍏

valtzu reacted with thumbs up emojiOskarStark and Ninos reacted with laugh emoji

@geekabel
Copy link

What about renaming it toMacAddress?

I actually find this name more relevant than simply puttingMac

OskarStark reacted with thumbs up emoji

@Ninos
Copy link
ContributorAuthor

I see what you did there. 🍏

Hahah, seems I'm so "anti Apple", that I forgot one of the most known names in world... :D

I don't think there will be any constraint used in real scenario to check mac devices (mac device names?) - but if, the constraint should be a prefixed with the name of the company, e.g.AppleMac. But I can change it toMacAddress, if preferred, just let me know :-)

OskarStark and geekabel reacted with laugh emoji

@xabbuh
Copy link
Member

As I said in#51777 (comment) I am not convinced that this is a common enough use case to be part of the Symfony core.

@derrabus
Copy link
Member

I am not convinced that this is a common enough use case to be part of the Symfony core.

Yeah, maybe we should encourage releasing niche-y validators as standalone packages more.

Then again, we have other network-related constraints, like the already mentioned IP and CIDR. What makes this one different?

@OskarStark
Copy link
Contributor

To me aMacAddress is general enough to be part of the core.

I vote for naming itMacAddress.

@xabbuh
Copy link
Member

Then again, we have other network-related constraints, like the already mentioned IP and CIDR. What makes this one different?

I can work with a client's IP address. But for MAC addresses I do only get the one from the latest hop.

@OskarStark
Copy link
Contributor

@Ninos can you please elaborate on your use-case? Thanks

@geekabel
Copy link

To me aMacAddress is general enough to be part of the core.

I vote for naming itMacAddress.

I voteMacAddress too

@Ninos
Copy link
ContributorAuthor

Ninos commentedOct 23, 2023
edited
Loading

Renamed toMacAddress, hope it's fine now :-)

can you please elaborate on your use-case?

Application e.g. for storing device specific mac addresses

andreybolonin reacted with hooray emoji

@NinosNinos changed the title[Validator] AddMac constraint for validating MAC address[Validator] AddMacAddress constraint for validating MAC addressOct 23, 2023
@nicolas-grekasnicolas-grekas modified the milestones:6.4,7.1Nov 15, 2023
@OskarStark
Copy link
Contributor

PR rebased ✅

Ninos reacted with heart emoji

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.

Still GTM. Let's make a decision on this one?

@xabbuh
Copy link
Member

I still don’t see this as a common enough use case, but I won’t insist if others agree with adding this constraint.

@nicolas-grekas
Copy link
Member

Thank you@Ninos.

Ninos reacted with heart emoji

@nicolas-grekasnicolas-grekas merged commita935659 intosymfony:7.1Jan 2, 2024
@NinosNinos deleted the constraints-mac branchJanuary 8, 2024 04:30
fabpot added a commit that referenced this pull requestApr 13, 2024
…`UNIVERSAL_*`, `UNICAST_*`, `MULTICAST_*`, `BROADCAST`) in `MacAddress` constraint (Ninos)This PR was squashed before being merged into the 7.1 branch.Discussion----------[Validator] Add support for types (`ALL*`, `LOCAL_*`, `UNIVERSAL_*`, `UNICAST_*`, `MULTICAST_*`, `BROADCAST`) in `MacAddress` constraint| Q             | A| ------------- | ---| Branch?       | 7.1| Bug fix?      | no| New feature?  | yes| Deprecations? | no| License       | MITBefore some months we added the `MacAddress` contraint to v7.1, see also#51862This MR also adds support for validating unicast/multicast, local/universal or any (default) mac address versions. For more informations, see:https://en.wikipedia.org/wiki/MAC_address#Ranges_of_group_and_locally_administered_addresses~~PS: May we should rename `PRIVATE` & `PUBLIC` to `LOCAL` & `UNIVERSAL` to be a bit more consistent with naming in mac address standard. Also then maybe `version` attribute to `type`. .. Just let me know (already prepared changes locally) :-)~~Commits-------16b9210 [Validator] Add support for types (`ALL*`, `LOCAL_*`, `UNIVERSAL_*`, `UNICAST_*`, `MULTICAST_*`, `BROADCAST`) in `MacAddress` constraint
@fabpotfabpot mentioned this pull requestMay 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@OskarStarkOskarStarkOskarStark approved these changes

@xabbuhxabbuhAwaiting requested review from xabbuh

@fabpotfabpotAwaiting requested review from fabpot

Assignees

No one assigned

Projects

None yet

Milestone

7.1

Development

Successfully merging this pull request may close these issues.

8 participants

@Ninos@OskarStark@derrabus@geekabel@xabbuh@nicolas-grekas@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp