diff --git a/app/imports/api/properties/Attributes.js b/app/imports/api/properties/Attributes.js index 1eb63ab9..becc3769 100644 --- a/app/imports/api/properties/Attributes.js +++ b/app/imports/api/properties/Attributes.js @@ -14,7 +14,7 @@ let AttributeSchema = new SimpleSchema({ variableName: { type: String, regEx: VARIABLE_NAME_REGEX, - min: 3, + min: 2, defaultValue: 'newAttribute', }, // How it is displayed and computed is determined by type diff --git a/app/imports/api/properties/ClassLevels.js b/app/imports/api/properties/ClassLevels.js index a4d46c60..97295080 100644 --- a/app/imports/api/properties/ClassLevels.js +++ b/app/imports/api/properties/ClassLevels.js @@ -9,6 +9,7 @@ let ClassLevelSchema = new SimpleSchema({ // The name of this class level's variable variableName: { type: String, + min: 2, regEx: VARIABLE_NAME_REGEX, }, level: { diff --git a/app/imports/api/properties/Skills.js b/app/imports/api/properties/Skills.js index a4310d55..9a4a807f 100644 --- a/app/imports/api/properties/Skills.js +++ b/app/imports/api/properties/Skills.js @@ -1,4 +1,5 @@ import SimpleSchema from 'simpl-schema'; +import VARIABLE_NAME_REGEX from '/imports/constants/VARIABLE_NAME_REGEX.js'; /* * Skills are anything that results in a modifier to be added to a D20 @@ -13,7 +14,8 @@ let SkillSchema = new SimpleSchema({ // Ignored for skilltype = save variableName: { type: String, - regEx: /^\w*[a-z]\w*$/i, + regEx: VARIABLE_NAME_REGEX, + min: 2, }, // The variable name of the ability this skill relies on ability: {