public static Color::validateColor(&$element, FormStateInterface $form_state, &$complete_form)
Form element validation handler for #type 'color'.
File
core/lib/Drupal/Core/Render/Element/Color.php, line 52
Class
Color Provides a form element for choosing a color.
Namespace
Drupal\Core\Render\Element
Code
public static function validateColor(&$element, FormStateInterface $form_state, &$complete_form) {
$value = trim($element['#value']);
// Default to black if no val