(tableFolderRoot: string)
| 181 | * - Cannot contain the sequence "..". |
| 182 | */ |
| 183 | export function validateIcebergConfigTableFolderRoot(tableFolderRoot: string): void { |
| 184 | if (!/^[a-zA-Z0-9][a-zA-Z0-9-._]{1,220}[a-zA-Z0-9]$/.test(tableFolderRoot) || tableFolderRoot.includes("..")) { |
| 185 | throw new Error( |
| 186 | "Invalid input. Must start and end with a letter or number, contain only letters (a-z, A-Z), numbers, hyphens (-), underscores (_), and periods (.)." |
| 187 | ); |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | /** |
| 192 | * Validates a string to ensure it is a valid subpath within an Iceberg table folder. |
no test coverage detected