Skip to content

Wrong backgroundColor validation #21

Open

Description

@SergiuSavva

backgroundColor - The article's background color, defined as a 3- to 8-character RGBA hexadecimal string; e.g., #000 for black or #FF00007F for red with an alpha (opacity) of 50%. Defaults to white

src/Document/Styles/DocumentStyle.php

if should be
https://github.com/chapter-three/AppleNewsAPI/blob/master/src/Document/Styles/DocumentStyle.php#L67

  protected function validateBackgroundColor($value) {
    if (!$this->isHexColor($value)) {
      $this->triggerError('backgroundColor is not valid');
      return FALSE;
    }
    return TRUE;
  }

Activity

  1. RajeevChoudharyNBC commented on Feb 23, 2022

    @RajeevChoudharyNBC

    What is the alternate for this issue, as removing the setDocumentStyle makes it impossible to implement DocumentStyle class to add backgroundcolor for the article.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions