Skip to main content

hex_color

Function hex_color 

Source
pub fn hex_color(value: Input<'_>) -> bool
Expand description

A string of 3 or 6 hex digits, no #. The pattern’s $ also matches before a final newline, so one trailing "\n" is allowed.

PHP: HexColor::isValid() (/^([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).