Validates given character customization.
A character customization given by user is like following:
[{"optionId": 1000, "color": "#DDDDDD"},
{"optionId": 2000, "color": "#DDDDDD"},
{"optionId": 7002}]
Option group rules:
- There must be a selection for each group with forceSelect=true
- Number of selected options for a group must be less than allowed maximum for the group
Option rules:
- Selected options must exist
- If color is not received for a selected option, color must not have color selection required
- If color is received, colors must be allowed for that option and received one is in the allowed colors list
Parameters:
Name | Type | Description |
---|---|---|
charParts |
Array.<UserCharPart> | character customization |
Returns:
A meaningful message in case of problems; undefined
otherwise
- Type
- string | undefined