Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENHANCEMENT validation configuration #152

Open
muskie9 opened this issue Jan 15, 2019 · 0 comments · May be fixed by #155
Open

ENHANCEMENT validation configuration #152

muskie9 opened this issue Jan 15, 2019 · 0 comments · May be fixed by #155
Assignees
Milestone

Comments

@muskie9
Copy link
Member

muskie9 commented Jan 15, 2019

Summary

We've found some instances where SlideImage is extended for an instance not needing the image, or allowing for additional options. Currently the validation is strict in requiring the SlideImage record.

Proposed Solution

Additional logic in the SlideImage::validate() method to allow for customization of the required ImageID field.

_config.yml

Dynamic\FlexSlider\Model\SlideImage
  require_image: false

# MyPage extends \Page
Foo\Bar\MyPage:
  extensions:
    - Dynamic\FlexSlider\ORM\FlexSlider
  require_image: true

Validation should check if the related object has a config override for require_image. If no config is found, it should fall back to the SlideImage's config for require_image. This allows for a global setting (default of true) as well as model specific overrides.

@muskie9 muskie9 self-assigned this Jan 15, 2019
@mak001 mak001 linked a pull request Jan 17, 2019 that will close this issue
@muskie9 muskie9 added the v3 label May 8, 2019
@muskie9 muskie9 added this to the 3.1.0 milestone May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant