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 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>
public sealed class AbsoluteUriAttribute : System.ComponentModel.DataAnnotations.ValidationAttributeInheritance System.Object → System.Attribute → System.ComponentModel.DataAnnotations.ValidationAttribute → AbsoluteUriAttribute
Constructors
AbsoluteUriAttribute(string) Constructor
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 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>
public AbsoluteUriAttribute(string? requireScheme=null);Parameters
requireScheme System.String