Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ IsValid() [1/2]

override bool System.ComponentModel.DataAnnotations.RequiredAttribute.IsValid ( object? value)
inlinevirtual

Reimplemented from System.ComponentModel.DataAnnotations.ValidationAttribute.

Definition at line 13 of file RequiredAttribute.cs.

14 {
15 if (value == null)
16 {
17 return false;
18 }
19 if (!AllowEmptyStrings && value is string value2)
20 {
21 return !string.IsNullOrWhiteSpace(value2);
22 }
23 return true;
24 }

References System.ComponentModel.DataAnnotations.RequiredAttribute.AllowEmptyStrings, and System.value.