> ## Documentation Index
> Fetch the complete documentation index at: https://ancplua.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AL0021 - Multiple structured form sources

> An endpoint can only have one structured form source

Source: [AL0020ToAL0024FormBindingAnalyzer.cs](https://github.com/ANcpLua/ANcpLua.Analyzers/blob/main/src/ANcpLua.Analyzers/Analyzers/AL0020ToAL0024FormBindingAnalyzer.cs)

## Description

An endpoint can only have one structured form source. Multiple \[FromForm] DTOs or IFormCollections create ambiguity about which parameter receives the form data.

## Bad Code

```csharp theme={null}
([FromForm] UserDto user, [FromForm] AddressDto address)
```

## Good Code

```csharp theme={null}
([FromForm] CombinedDto data) // combine into single DTO
```

## Properties

* **Category**: ASP.NET Core
* **Severity**: Error
* **Enabled by default**: True
* **Code fix available**: False

## Configuration

```editorconfig theme={null}
dotnet_diagnostic.AL0021.severity = warning
```
