Skip to content

Commit 3292e54

Browse files
author
Robert He
committed
MAGETWO-89658: Add validation check and rule
- added validation for color inputs
1 parent fbd275c commit 3292e54

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/Ui/view/base/ui_component/etc/definition/colorPicker.xsd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<xs:annotation>
3030
<xs:documentation>
3131
Defines the color format that is displayed in selection tool as well as in input field.
32-
Valid formats: hex, rgb, hsl, name, none
32+
Valid formats: hex, rgb, hsl, hsv, name, none
3333
</xs:documentation>
3434
</xs:annotation>
3535
</xs:element>

app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ define([
973973

974974
return tinycolor(value).isValid();
975975
},
976-
$.mage.__('Wrong color format.')
976+
$.mage.__('Wrong color format. Please specify color in HEX, RGBa, HSVa, HSLa or use color name.')
977977
],
978978
'blacklist-url': [
979979
function (value, param) {

0 commit comments

Comments
 (0)