allow 3-character hexadecimal color inputs
1 unresolved thread
1 unresolved thread
Closes #3396018
Merge request reports
Activity
- Resolved by Andy Blum
107 108 '#maxlength' => 7, 108 109 '#size' => 10, 109 110 '#title' => t($title), 110 '#description' => t('Enter color in full hexadecimal format (#abc123).') . '<br/>' . t('Derivatives will be formed from this color.'), 111 '#description' => t('Enter color in hexadecimal format (#abc123).') . '<br/>' . t('Derivatives will be formed from this color.'), 111 112 '#default_value' => theme_get_setting($key), 112 113 '#attributes' => [ 113 'pattern' => '^#[a-fA-F0-9]{6}', 114 // Regex copied from Color::validateHex() 115 'pattern' => '^[#]?([0-9a-fA-F]{3}){1,2}$',
Please register or sign in to reply