feat: implement tenant update request validation and add feature tests for domain bootstrapping
This commit is contained in:
@@ -27,6 +27,11 @@ class Tenant extends Model
|
||||
use HasAttachments;
|
||||
use HasFactory;
|
||||
|
||||
public function getRouteKeyName(): string
|
||||
{
|
||||
return 'codigo';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo<Attachment, $this>
|
||||
*/
|
||||
|
||||
@@ -88,12 +88,12 @@ class UpdateTenantRequest extends FormRequest
|
||||
|
||||
return [
|
||||
'codigo' => [
|
||||
'required',
|
||||
'sometimes',
|
||||
'string',
|
||||
'max:255',
|
||||
Rule::unique('tenants', 'codigo')->ignore($tenant?->id),
|
||||
],
|
||||
'nombre' => ['required', 'string', 'max:255'],
|
||||
'nombre' => ['sometimes', 'string', 'max:255'],
|
||||
'dominio' => [
|
||||
'bail',
|
||||
function (string $attribute, mixed $value, Closure $fail): void {
|
||||
|
||||
Reference in New Issue
Block a user