Skip to content

Commit 2b49753

Browse files
committed
fix(lib): 修复color 校验
1 parent d32d079 commit 2b49753

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/lib/utils/schema/validate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function createAjvInstance() {
3232
ajvInstance.addFormat(
3333
'color',
3434
// eslint-disable-next-line max-len
35-
/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgba?|hlsa?)\(.*\))$/
35+
/^(#?([0-9A-Fa-f]{3,4}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgba?|hsla?)\(.*\))$/
3636
);
3737
return ajvInstance;
3838
}

0 commit comments

Comments
 (0)