[fix] Support non latin characters in schema names (#5063)
Fixes #4943 ## How was it tested? Local (front + /metadata) Unit tests for utils --------- Co-authored-by: Weiko <corentin@twenty.com>
This commit is contained in:
@ -0,0 +1,9 @@
|
||||
import { InvalidStringException } from 'src/engine/metadata-modules/errors/InvalidStringException';
|
||||
|
||||
const VALID_STRING_PATTERN = /^[a-zA-Z][a-zA-Z0-9 ]*$/;
|
||||
|
||||
export const validateMetadataName = (string: string) => {
|
||||
if (!string.match(VALID_STRING_PATTERN)) {
|
||||
throw new InvalidStringException(string);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user