Made minimum variable name 2 characters long

This commit is contained in:
Thaum Rystra
2020-05-28 21:26:31 +02:00
parent 36c23e1eb5
commit d4804e5292
3 changed files with 5 additions and 2 deletions

View File

@@ -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: {