feat(form-builder): FormFieldValidationRuleService + legacy backfill + snapshot + library row-copy

This commit is contained in:
2026-04-24 22:12:08 +02:00
parent fedaed1b32
commit 800b1b6c01
16 changed files with 1430 additions and 18 deletions

View File

@@ -27,6 +27,7 @@ final class FormFieldService
public function __construct(
private readonly FormSchemaService $schemaService,
private readonly FormFieldBindingService $bindingService,
private readonly FormFieldValidationRuleService $validationRuleService,
) {}
public function create(FormSchema $schema, array $data): FormField
@@ -216,6 +217,7 @@ final class FormFieldService
$field = FormField::create($data);
$this->bindingService->copyBindings($library, $field);
$this->validationRuleService->copyRules($library, $field);
FormFieldLibrary::query()->whereKey($library->id)->increment('usage_count');