Enhance VM creation request validation and UI.

- Introduced `prepareForValidation` method to handle input merging for `behind_traefik` and `devices`.
- Updated validation rules to conditionally require `subdomain` based on `behind_traefik`.
- Added custom attribute names and error messages for better user feedback.
- Improved the create VM form to dynamically show/hide subdomain fields based on the `behind_traefik` checkbox state.
- Adjusted the user selection logic to display a message when no customers are available.
This commit is contained in:
TheOnlyMace
2026-05-17 14:32:08 +02:00
parent 5b260022f8
commit e00d92a75b
3 changed files with 125 additions and 14 deletions

28
lang/de/validation.php Normal file
View File

@@ -0,0 +1,28 @@
<?php
return [
'accepted' => ':attribute muss akzeptiert werden.',
'required' => ':attribute muss ausgefüllt werden.',
'string' => ':attribute muss eine Zeichenkette sein.',
'integer' => ':attribute muss eine ganze Zahl sein.',
'boolean' => ':attribute muss wahr oder falsch sein.',
'email' => ':attribute muss eine gültige E-Mail-Adresse sein.',
'max' => [
'string' => ':attribute darf maximal :max Zeichen haben.',
'integer' => ':attribute darf maximal :max sein.',
],
'min' => [
'string' => ':attribute muss mindestens :min Zeichen haben.',
'integer' => ':attribute muss mindestens :min sein.',
],
'regex' => 'Das Format von :attribute ist ungültig.',
'unique' => ':attribute ist bereits vergeben.',
'confirmed' => ':attribute stimmt nicht mit der Bestätigung überein.',
'exists' => 'Der gewählte :attribute ist ungültig.',
'in' => 'Der gewählte :attribute ist ungültig.',
'required_if' => ':attribute ist erforderlich, wenn :other :value ist.',
'attributes' => [],
];