Skip to content

Commit

Permalink
fix(lib): 修复color 校验
Browse files Browse the repository at this point in the history
  • Loading branch information
lljj-x committed Aug 7, 2022
1 parent d32d079 commit 2b49753
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/lib/utils/schema/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function createAjvInstance() {
ajvInstance.addFormat(
'color',
// eslint-disable-next-line max-len
/^(#?([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?)\(.*\))$/
/^(#?([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?)\(.*\))$/
);
return ajvInstance;
}
Expand Down

0 comments on commit 2b49753

Please sign in to comment.