Validate length of metadata fields

Description

Acceptance criteria

We need to validate input. For this scenario (content upgrade) we should save the data, but make sure it does not crash. For texts longer than the DB schema allows, we should truncate it.

Background

One node on h5p.org has an extremely long copyright field (IV specific one) filled with rubbish. That data is moved to the metadata part in IV’s content upgrade, and it ends in a DB error:
Data too long for column 'license_extras'

Environment

None

Acceptance Criteria

None

Assignee

Pål Jørgensen

Reporter

Pål Jørgensen

Labels

Funding

None

Code reviewer

None

Released

None

Time tracking

0m

Fix versions

Sprint

None

Priority

Medium
Configure