Wizard: Update kernel argument validation regex

There are special characters missing from the validation regex.
This commit is contained in:
regexowl 2025-08-05 14:03:05 +02:00 committed by Gianluca Zuccarelli
parent 894d2a4d76
commit 2bea0bd50b
3 changed files with 4 additions and 4 deletions

View file

@ -47,7 +47,7 @@ test('Create a blueprint with Kernel customization', async ({
await frame.getByRole('button', { name: 'Add kernel argument' }).click();
await frame
.getByPlaceholder('Add kernel argument')
.fill('invalid/argument');
.fill('invalid$argument');
await frame.getByRole('button', { name: 'Add kernel argument' }).click();
await expect(
frame.getByText(

View file

@ -122,7 +122,7 @@ export const isKernelNameValid = (kernelName: string) => {
};
export const isKernelArgumentValid = (arg: string) => {
return /^[a-zA-Z0-9=-_,."']*$/.test(arg);
return /^[a-zA-Z0-9=\-_,."'/:#+]*$/.test(arg);
};
export const isPortValid = (port: string) => {

View file

@ -262,7 +262,7 @@ keyboard = "invalid-keyboard"
[customizations.kernel]
name = "--invalid-kernel-name--"
append = "invalid-kernel-argument"
append = "invalid$kernel$argument"
[customizations.firewall]
ports = ["invalid-port"]
@ -640,7 +640,7 @@ describe('Import modal', () => {
);
await waitFor(() =>
user.click(
screen.getByRole('button', { name: /close invalid-kernel-argument/i })
screen.getByRole('button', { name: /close invalid\$kernel\$argument/i })
)
);