-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
If I save an e.g. ElementFeaturedVideo without a video id value (the Video property), the call to e.g. getEmbedUrl fails as it expects a string videoId rather than a null. It should be made a required field.
Acceptance Criteria
- There is a validateVideoCode method in the VideoFromProvider trait. The video Id (video code) is passed to this. Check if the video id passed is an empty string
- If it is an empty string, throw a ValidationException with translateable instructions for the user, using the current URL check as a guide.
- The getVideoid() method in the VideoFromProvider trait should return a string, add this as a return type. The default if the Video property is not set is a null, so this will need to be handled.
- write a test that tries to save and ElementFeaturedVideo or GalleryVideo without a Video property value. It should throw a ValidationException that can be checked in the unit test as an assertion.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels