mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-11 10:23:54 +00:00
make custom fields case sensitive (#1242)
* remove custom field lowercasing * don't allow custom field form to submit duplicate field * remove unused * update custom field tests * also keep upper case when editing * show key in UI * also kep upper case when creating a new field * fix test * allow old forced case keys to stay as is * allow space * add extension to import * supply initial key to CustomFieldForm * refactor: improve element contrast * refactor: style and composition * consistent use of `customFieldLabelToKey` * fix CopyTag * remove log --------- Co-authored-by: arc-alex <ac@omnivox.dk> Co-authored-by: Carlos Valente <carlosvalente@pm.me>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { isAlphanumeric } from 'ontime-utils';
|
||||
import { isAlphanumericWithSpace } from 'ontime-utils';
|
||||
|
||||
import { Request, Response, NextFunction } from 'express';
|
||||
import { body, param, validationResult } from 'express-validator';
|
||||
@@ -9,7 +9,7 @@ export const validateCustomField = [
|
||||
.isString()
|
||||
.trim()
|
||||
.custom((value) => {
|
||||
return isAlphanumeric(value);
|
||||
return isAlphanumericWithSpace(value);
|
||||
}),
|
||||
body('type').exists().isString().trim(),
|
||||
body('colour').exists().isString().trim(),
|
||||
|
||||
Reference in New Issue
Block a user