diff --git a/src/groups.js b/src/groups.js index 9ac7db90f..dd481d20c 100644 --- a/src/groups.js +++ b/src/groups.js @@ -56,7 +56,7 @@ GroupError.NOT_ALLOWED = 'Not Allowed'; function validateGroupname(name) { assert.strictEqual(typeof name, 'string'); - if (name.length <= 2) return new GroupError(GroupError.BAD_FIELD, 'name must be atleast 2 chars'); + if (name.length < 2) return new GroupError(GroupError.BAD_FIELD, 'name must be atleast 2 chars'); if (name.length >= 200) return new GroupError(GroupError.BAD_FIELD, 'name too long'); if (!/^[A-Za-z0-9_-]*$/.test(name)) return new GroupError(GroupError.BAD_FIELD, 'name can only have A-Za-z0-9_-');