Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
OskarStark commentedOct 6, 2023
What about renaming it to |
src/Symfony/Component/Validator/Tests/Constraints/MacValidatorTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Validator/Tests/Constraints/MacValidatorTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Validator/Tests/Constraints/MacValidatorTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Mac constraint for validating mac addressMac constraint for validating MAC addressNinos commentedOct 6, 2023
For me |
derrabus commentedOct 7, 2023
I see what you did there. 🍏 |
geekabel commentedOct 13, 2023
I actually find this name more relevant than simply putting |
Ninos commentedOct 17, 2023
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. |
xabbuh commentedOct 18, 2023
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 commentedOct 18, 2023
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 commentedOct 18, 2023
To me a I vote for naming it |
xabbuh commentedOct 18, 2023
I can work with a client's IP address. But for MAC addresses I do only get the one from the latest hop. |
OskarStark commentedOct 18, 2023
@Ninos can you please elaborate on your use-case? Thanks |
geekabel commentedOct 18, 2023
I vote |
Ninos commentedOct 23, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Renamed to
Application e.g. for storing device specific mac addresses |
Mac constraint for validating MAC addressMacAddress constraint for validating MAC addressUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
OskarStark commentedDec 29, 2023
PR rebased ✅ |
nicolas-grekas left a comment
There was a problem hiding this 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 commentedDec 30, 2023
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 commentedJan 2, 2024
Thank you@Ninos. |
…`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
Uh oh!
There was an error while loading.Please reload this page.
Possibility to validate against mac address.
See also past discussion:#51777