diff --git a/app/Domains/Catalog/Requests/StoreCategoryRequest.php b/app/Domains/Catalog/Requests/StoreCategoryRequest.php index 5c6cd7e..e65b9f5 100644 --- a/app/Domains/Catalog/Requests/StoreCategoryRequest.php +++ b/app/Domains/Catalog/Requests/StoreCategoryRequest.php @@ -18,7 +18,7 @@ class StoreCategoryRequest extends FormRequest public function rules(): array { return [ - 'tenant_code' => ['required', 'string', 'exists:tenants,codigo'], + 'tenant_code' => ['required_with:categoria_id', 'string', 'exists:tenants,codigo'], 'categoria_id' => ['nullable', 'integer', 'exists:categorias,id'], 'nombre' => ['required', 'string', 'max:255'], ...PropRules::sync(),