You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug isMACAddress(str) might be using an incorrect RegExp for testing MAC address with dots. I might be wrong, have no experience at all using MAC addresses, was just browsing the code.
The pull request that introduced the support for MAC address with dots specifically intended to support 0102.0304.05ab, but the RegExp used is:
Describe the bug
isMACAddress(str)
might be using an incorrect RegExp for testing MAC address with dots. I might be wrong, have no experience at all using MAC addresses, was just browsing the code.The pull request that introduced the support for MAC address with dots specifically intended to support
0102.0304.05ab
, but the RegExp used is:const macAddressWithDots = /^([0-9a-fA-F]{4}).([0-9a-fA-F]{4}).([0-9a-fA-F]{4})$/;
https://github.com/validatorjs/validator.js/blob/master/src/lib/isMACAddress.js#L7
Examples
The dots (.) allow for any character to work as separator
0102X0304X05ab
0102 0304 05ab
0102/0304/05ab
Additional context
Validator.js version: 13.5.1
The text was updated successfully, but these errors were encountered: