Add params as type
This commit is contained in:
parent
06d512e8ae
commit
68ecce179e
|
@ -27,6 +27,7 @@ class StoreAction
|
|||
'name' => 'required|string|max:255',
|
||||
'domain' => 'required|string|max:255',
|
||||
'type.cls' => ['required', 'string', 'max:255', Rule::in(app('mail-gateways'))],
|
||||
'type.params' => 'present|array',
|
||||
...collect(request()->input('type.cls')::rules('storeValidator'))->mapWithKeys(fn ($rules, $key) => ["type.params.{$key}" => $rules]),
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue