fix: Move collection index validation logic to a context assert function (#2116)
* Abstract validation logic for readability * Add index validation in collections.move * Add tests
This commit is contained in:
4
shared/utils/indexCharacters.js
Normal file
4
shared/utils/indexCharacters.js
Normal file
@ -0,0 +1,4 @@
|
||||
// @flow
|
||||
|
||||
export const validateIndexCharacters = (index: string) =>
|
||||
/^[\x21-\x7E]+$/i.test(index);
|
Reference in New Issue
Block a user