mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 02:51:14 +00:00
feat: Revamp Data Table column name restrictions (no-changelog) (#18851)
This commit is contained in:
@@ -132,7 +132,7 @@ describe('AddColumnButton', () => {
|
||||
const nameInput = getByPlaceholderText('Enter column name');
|
||||
|
||||
// Test valid names
|
||||
const validNames = ['column1', 'my-column', 'Column123', 'a1b2c3'];
|
||||
const validNames = ['column1', 'my_column', 'Column123', 'a1b2c3'];
|
||||
|
||||
for (const name of validNames) {
|
||||
await fireEvent.update(nameInput, name);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { DATA_STORE_COLUMN_REGEX } from '@n8n/api-types';
|
||||
|
||||
// Route and view identifiers
|
||||
export const DATA_STORE_VIEW = 'data-stores';
|
||||
export const PROJECT_DATA_STORES = 'project-data-stores';
|
||||
@@ -25,7 +27,7 @@ export const DEFAULT_ID_COLUMN_NAME = 'id';
|
||||
|
||||
export const MAX_COLUMN_NAME_LENGTH = 128;
|
||||
|
||||
export const COLUMN_NAME_REGEX = /^[a-zA-Z0-9][a-zA-Z0-9-]*$/;
|
||||
export const COLUMN_NAME_REGEX = DATA_STORE_COLUMN_REGEX;
|
||||
|
||||
export const MIN_LOADING_TIME = 500; // ms
|
||||
|
||||
|
||||
Reference in New Issue
Block a user