Prior to this commit, the wizard showed "Invalid description" when
the description was too long. This was rather unhelpful for users.
The actual size check happens in validators.ts, but the functions there
just return a boolean value, even if they check for multiple criteria.
I'm not entirely sure, why the validation functions live in a separate
file, so I decided to move this specific condition to useValidation.tsx
so the condition, and the relevant user-facing error message can be
defined next to each other.
This adds a group input to the User step. The input is implemented as a `LabelInput`, when Administrator checkbox is checked, `wheel` group gets added and it's removal automatically unchecks the Administrator checkbox again.
This commit refactors the Description field by replacing HookValidatedInput with the new ValidatedInputAndTextArea component.
It fixes a bug where the validation icon remained visible after the user cleared the Description field.
This commit splits the HookValidatedInput component into three separate functions to improve modularity and readability:
- `getValidationState`: Calculates the validation state ('default', 'success', 'error') based on whether the input is pristine and if there is an error message.
- `ValidatedInputAndTextArea`: Renders the TextInput or TextArea component, utilizing the `getValidationState` output.
- `ErrorMessage`: Displays validation error messages.
This refactoring enhances code maintainability and testability, and the updated structure is now implemented for the username field.
This adds the kernel append input. New arguments can be added by pressing the "Add" button or hitting Enter after the argument.
The kernel arguments linked to a selected OpenSCAP profile are rendered in a category marked as "Required by OpenSCAP" and are read only.
Hostname validation rules can be found in the hostname man pages (`man 5
hostname`). This commit tweaks the hostname validator function so it is
in line with these guidelines by limiting the length to 64 characters
and also updates the error message for invalid hostnames to provide
users with some additional guidance/context when an invalid hostname is
provided.