1 | "use strict";
|
2 |
|
3 | module.exports = function validationColor(props, propName, componentName) {
|
4 | if (props[propName] && !/^#[0-9a-fA-F]{3,6}$/.test(props[propName])) {
|
5 | return new Error(componentName + ".props." + propName + " Validation failed!");
|
6 | }
|
7 | }; |
\ | No newline at end of file |