src/Rules/HexadecimalTrait.php
private function validateHexadecimal($value)
    {
        $isValid = filter_var(
            $value,
            FILTER_VALIDATE_REGEXP,
            array(
                "options" => array("regexp" => '`^[0-9A-Fa-f]+$`'),
            )
        );
        if ($isValid === false) {
            $this->throwInvalidArgumentMustBe("valid hexadecimal");
        }
    }
private function validateHexadecimal($value)
    {
        $isValid = filter_var(
            $value,
            FILTER_VALIDATE_REGEXP,
            array(
                "options" => array("regexp" => '`^[0-9A-Fa-f]+$`'),
            )
        );
        if ($isValid === false) {
            $this->throwInvalidArgumentMustBe("valid hexadecimal");
        }
    }
private function validateHexadecimal ( $ value ) { $ isValid = filter_var ( $ value , FILTER_VALIDATE_REGEXP , array ( "options" => array ( "regexp" => '`^[0-9A-Fa-f]+$`' ) , ) ) ; if ( $ isValid === false ) { $ this -> throwInvalidArgumentMustBe ( "valid hexadecimal" ) ; } }
Allowed characters: 0-9, a-f, A-F

@param $value
Allowed characters : 0 - 9 a - f A - F