Removed color max length, using regex instead

This commit is contained in:
Stefan Zermatten
2021-09-29 18:32:12 +02:00
parent cb1fd38df3
commit 7dac0cf3f3
3 changed files with 2 additions and 3 deletions

View File

@@ -175,7 +175,7 @@ const ComputedOnlyActionSchema = createPropertySchema({
'resources.itemsConsumed.$.itemColor': {
type: String,
optional: true,
max: STORAGE_LIMITS.color,
regEx: /^#([a-f0-9]{3}){1,2}\b$/i,
removeBeforeCompute: true,
},
'resources.attributesConsumed': {

View File

@@ -49,7 +49,7 @@ const ComputedOnlyItemConsumedSchema = new SimpleSchema({
itemColor: {
type: String,
optional: true,
max: STORAGE_LIMITS.color,
regEx: /^#([a-f0-9]{3}){1,2}\b$/i,
},
});

View File

@@ -2,7 +2,6 @@ const STORAGE_LIMITS = Object.freeze({
// String lengths
calculation: 1024,
collectionName: 64,
color: 10000,
description: 49473, //the length of the Bee Movie script
inlineCalculationField: 49473,
errorMessage: 256,