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] Add support for types (ALL*,LOCAL_*,UNIVERSAL_*,UNICAST_*,MULTICAST_*,BROADCAST) inMacAddress constraint#54473
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
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Validator/Constraints/MacAddressValidator.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Validator/Constraints/MacAddressValidator.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
stof commentedApr 3, 2024
Naming that setting |
Ninos commentedApr 3, 2024 • 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.
@stof thank you! I changed the code & naming a bit, think it's a bit cleaner now. Thought about splitting the different types (unicast/multicast & local/universal) into different attributes (don't ask me about possibilities for attribute naming...), but this would increase the complexity a bit, if someone somehow needs to validate e.g. broadcast ( PS: May we could also rename |
ALL,LOCAL_*,UNIVERSAL_*,UNICAST_*,MULTICAST_*) inMacAddress constraint589cd04 to300cf1cCompareNinos commentedApr 3, 2024
I added broadcast validation & also renamed |
ALL,LOCAL_*,UNIVERSAL_*,UNICAST_*,MULTICAST_*) inMacAddress constraintALL*,LOCAL_*,UNIVERSAL_*,UNICAST_*,MULTICAST_*,BROADCAST) inMacAddress constraint93d6f02 to02d3f21Comparesrc/Symfony/Component/Validator/Constraints/MacAddressValidator.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Validator/Constraints/MacAddressValidator.php OutdatedShow resolvedHide resolved
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.
src/Symfony/Component/Validator/Constraints/MacAddressValidator.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Validator/Constraints/MacAddressValidator.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
638ab7f tocc07a5aComparesrc/Symfony/Component/Validator/Constraints/MacAddressValidator.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Validator/Constraints/MacAddressValidator.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Validator/Constraints/MacAddressValidator.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
| */ | ||
| publicfunction__construct( | ||
| publicstring$message ='This value is not a valid MAC address.', | ||
| publicstring$type =self::ALL, |
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.
Not a BC break as the constraint was added in 7.1.
…`UNICAST_*`, `MULTICAST_*`, `BROADCAST`) in `MacAddress` constraint
e42d81f to16b9210Comparefabpot commentedApr 13, 2024
Thank you@Ninos. |
…NIVERSAL_*`, `UNICAST_*`, `MULTICAST_*`, `BROADCAST`) in `MacAddress` constraint (Ninos)This PR was merged into the 7.1 branch.Discussion----------[Validator] Add support for types (`ALL*`, `LOCAL_*`, `UNIVERSAL_*`, `UNICAST_*`, `MULTICAST_*`, `BROADCAST`) in `MacAddress` constraintSee also following pull request:symfony/symfony#54473Commits-------0ed185a [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.
Before some months we added the
MacAddresscontraint 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 renamePRIVATE&PUBLICtoLOCAL&UNIVERSALto be a bit more consistent with naming in mac address standard. Also then maybeversionattribute totype. .. Just let me know (already prepared changes locally) :-)