Skip to content

ElementsRequiredAttribute Class

A validation attribute that rejects a collection containing a null element; a non-collection value is left untouched. Shared by the MVC and Minimal API OIDC server adapters, whose source generators emit it from the declarative core ElementsRequired marker.

C#
public sealed class ElementsRequiredAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute

Inheritance System.ObjectSystem.AttributeSystem.ComponentModel.DataAnnotations.ValidationAttribute → ElementsRequiredAttribute