15 Sep Rubric Validation
Rubric
Selection in rubric is made by human. Rubric contains contents that shares the same criteria (eg. Movies). Rubric corresponds with limited layout place.
Validation
As per above: rubric content can undergo validation, for example:
- has rubric sufficient contents?
- is selected content a movie?
Example script
Script needs to be placed in rubric validation.
Following example script counts records in a rubric. User will be informed during selection.def is_in_limit(limit):
“””
Compare number of records in rubric, to limit
:param limit: min number of records in rubric
:return: Error if too few selected, else None
“””
total_count = 0
for record in Records:
total_count += 1
if total_count <= limit:
return AddError(
‘Choose at least {} records for [TEST] QR: ‘
‘Movie Highlights rubric\nCurrently selected {} records’
.format(limit, total_count))
else:
return None
is_in_limit(25)
Product configuration
Flag “CCGM” on product level has to be set to make this feature work.
Result
Result will be presented to the user in Content Selector.
Sorry, the comment form is closed at this time.