|string> */ public function rules(): array { return [ 'service_id' => ['required', 'integer', 'exists:services,id'], 'role' => ['required', Rule::enum(EnvironmentAttachmentRole::class)], 'name' => ['nullable', 'string', 'max:255'], 'env_prefix' => ['nullable', 'string', 'max:32', 'regex:/^[A-Z][A-Z0-9_]*$/'], 'is_primary' => ['boolean'], ]; } }