Skip to content
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

[8.x] Add rule to validate MAC address #40098

Merged
merged 1 commit into from
Dec 20, 2021
Merged

[8.x] Add rule to validate MAC address #40098

merged 1 commit into from
Dec 20, 2021

Conversation

bilalalmassry
Copy link
Contributor

add new validation rule "mac_address" to ensure that the attribute is a valid Mac Address

@bilalalmassry
Copy link
Contributor Author

bilalalmassry commented Dec 18, 2021

If this gets merged, I will make a PR to update the necessary docs

@GrahamCampbell GrahamCampbell changed the title add validate Mac Address [8.x] Add rule to validate MAC address Dec 18, 2021
* @param mixed $value
* @return bool
*/
public function validateMacAddress($attribute, $value)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe name the validation rule just "mac" to be consistent with "email" and "ip" for example?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it will understandable, clear enough, it could be consistent with "accepted_if", "require_if"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants