Tanuki
Tanuki
FFilament
Created by Tanuki on 9/21/2023 in #❓┊help
BeforeValidation addError on Wizard Step with repeater
The solution is to to do :
$errors = [];

foreach ($state['leaves'] as $key => $leave) {
$errorKey = "data.leaves.$key.from_date";
$errorMessage = 'An error message here.';

$livewire->addError($errorKey, $errorMessage);
$errors[$errorKey] = [$errorMessage];
}

if (!empty($errors)) {
throw \Illuminate\Validation\ValidationException::withMessages($errors);
}
$errors = [];

foreach ($state['leaves'] as $key => $leave) {
$errorKey = "data.leaves.$key.from_date";
$errorMessage = 'An error message here.';

$livewire->addError($errorKey, $errorMessage);
$errors[$errorKey] = [$errorMessage];
}

if (!empty($errors)) {
throw \Illuminate\Validation\ValidationException::withMessages($errors);
}
3 replies
FFilament
Created by Tanuki on 5/4/2023 in #❓┊help
RelationManagerTable access $records from headeractions
Thanks it solved my case
7 replies
FFilament
Created by Tanuki on 5/4/2023 in #❓┊help
RelationManagerTable access $records from headeractions
I'll follow your thought and go w/ bulkAction for the time beeing
7 replies
FFilament
Created by Tanuki on 5/4/2023 in #❓┊help
RelationManagerTable access $records from headeractions
7 replies
FFilament
Created by Tanuki on 3/14/2023 in #❓┊help
KeyValue is missing the associative part on edit
As always, thanks a lot 🙂
8 replies
FFilament
Created by Tanuki on 3/14/2023 in #❓┊help
KeyValue is missing the associative part on edit
Yeah indeed, it works !
8 replies
FFilament
Created by Tanuki on 3/14/2023 in #❓┊help
KeyValue is missing the associative part on edit
Oh, I didn't know I had to specify the cast on the relationship as well, since I added the $cast on the pivot model itself (I'm gonna try right away)
8 replies