#### [Abblix\.Utils](https://www.abblix.com/en/docs/api/abblix-utils 'index')
### [Abblix\.Utils\.Validation](https://www.abblix.com/en/docs/api/abblix-utils/Abblix.Utils.Validation 'Abblix\.Utils\.Validation')

## AbsoluteUriAttribute Class

A validation attribute that requires the value to be an absolute URI and, optionally, to use a specific scheme\.
Absence is valid \- combine with [System\.ComponentModel\.DataAnnotations\.RequiredAttribute](https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.requiredattribute 'System\.ComponentModel\.DataAnnotations\.RequiredAttribute') to also reject a missing value\. Shared by the MVC
and Minimal API OIDC server adapters, whose source generators emit it \(with the marker's scheme argument\) from the
declarative core `AbsoluteUri` marker\.
\<param name="requireScheme"\>

The URI scheme the value must use \(e\.g\. "https"\); any absolute scheme is accepted when null\.\</param\>

```csharp
public sealed class AbsoluteUriAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → [System\.Attribute](https://learn.microsoft.com/en-us/dotnet/api/system.attribute 'System\.Attribute') → [System\.ComponentModel\.DataAnnotations\.ValidationAttribute](https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.validationattribute 'System\.ComponentModel\.DataAnnotations\.ValidationAttribute') → AbsoluteUriAttribute
### Constructors

## AbsoluteUriAttribute\(string\) Constructor {#Abblix.Utils.Validation.AbsoluteUriAttribute.AbsoluteUriAttribute(string)}

A validation attribute that requires the value to be an absolute URI and, optionally, to use a specific scheme\.
Absence is valid \- combine with [System\.ComponentModel\.DataAnnotations\.RequiredAttribute](https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.requiredattribute 'System\.ComponentModel\.DataAnnotations\.RequiredAttribute') to also reject a missing value\. Shared by the MVC
and Minimal API OIDC server adapters, whose source generators emit it \(with the marker's scheme argument\) from the
declarative core `AbsoluteUri` marker\.
\<param name="requireScheme"\>

The URI scheme the value must use \(e\.g\. "https"\); any absolute scheme is accepted when null\.\</param\>

```csharp
public AbsoluteUriAttribute(string? requireScheme=null);
```
#### Parameters

<a id="Abblix.Utils.Validation.AbsoluteUriAttribute.AbsoluteUriAttribute(string).requireScheme"></a>

`requireScheme` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')
