#### [Abblix\.Oidc\.Server](https://www.abblix.com/en/docs/api/abblix-oidc-server 'index')
### [Abblix\.Oidc\.Server\.Common\.Validation](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Validation 'Abblix\.Oidc\.Server\.Common\.Validation')

## ErrorFactory Class

Builds [OidcError](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.OidcError 'Abblix\.Oidc\.Server\.Common\.OidcError') instances for the request\-binding layer shared by every endpoint and both transport
adapters\. The counterpart of the per\-area error factories \(authorization validation, token grants, dynamic client
registration, \.\.\.\): those cover protocol\-specific failures, this covers the malformed\-request failures the
declarative model validation surfaces before any handler runs\. It sits in its own `Common.Validation`
namespace rather than bare `Common` so it does not collide with those per\-area `ErrorFactory` classes in
the many core files that import `Common`\.

```csharp
public static class ErrorFactory
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → ErrorFactory
### Methods

## ErrorFactory\.InvalidRequest\(IEnumerable\<string\>\) Method {#Abblix.Oidc.Server.Common.Validation.ErrorFactory.InvalidRequest(System.Collections.Generic.IEnumerable_string_)}

Maps a flat sequence of model\-validation messages onto an [OidcError](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.OidcError 'Abblix\.Oidc\.Server\.Common\.OidcError') carrying the
[InvalidRequest](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.ErrorCodes#Abblix.Oidc.Server.Common.Constants.ErrorCodes.InvalidRequest 'Abblix\.Oidc\.Server\.Common\.Constants\.ErrorCodes\.InvalidRequest') code\. The input is a plain message sequence on purpose, so each
transport adapter can feed it the output of
[System\.ComponentModel\.DataAnnotations\.Validator](https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.validator 'System\.ComponentModel\.DataAnnotations\.Validator') and share one source of truth for
"a malformed request becomes invalid\_request"\.

```csharp
public static Abblix.Oidc.Server.Common.OidcError InvalidRequest(System.Collections.Generic.IEnumerable<string> messages);
```
#### Parameters

###### `messages` [System\.Collections\.Generic\.IEnumerable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1 'System\.Collections\.Generic\.IEnumerable\`1')[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1 'System\.Collections\.Generic\.IEnumerable\`1') {#Abblix.Oidc.Server.Common.Validation.ErrorFactory.InvalidRequest(System.Collections.Generic.IEnumerable_string_).messages}

The human\-readable validation messages collected for the rejected request\.

#### Returns
[OidcError](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.OidcError 'Abblix\.Oidc\.Server\.Common\.OidcError')  
An [OidcError](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.OidcError 'Abblix\.Oidc\.Server\.Common\.OidcError') describing the failure in OAuth terms\.
