2using System.Collections;
10 [AttributeUsage(AttributeTargets.Property, Inherited =
true, AllowMultiple =
false)]
18 public override bool IsValid(
object value)
20 return !(value is IEnumerable valuenumerable) || valuenumerable.Cast<
object>().Any();
Specifies that the enumerable property with this attribute cannot be empty when POSTing the resource ...
override bool IsValid(object value)
If the given value is an IEnumerable, it is only valid for POST if it is not empty.
Any attribute that can validate the value of a property.