Class RequiredAllowWhitespaceAttribute
- Namespace
- Acuit.Pinpoint.Common.Validation
- Assembly
- Acuit.Pinpoint.Common.dll
Specifies that a data field value is required.
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Parameter, AllowMultiple = false)]
public sealed class RequiredAllowWhitespaceAttribute : RequiredAttribute
- Inheritance
-
RequiredAllowWhitespaceAttribute
- Inherited Members
Remarks
This works just like RequiredAttribute, except that it does not trim the string value when performing its check, so values containing only white-space characters will be considered valid.
Constructors
RequiredAllowWhitespaceAttribute()
public RequiredAllowWhitespaceAttribute()
Methods
IsValid(object?)
Checks whether the specified object is valid.
public override bool IsValid(object? value)
Parameters
valueobjectThe value of the object to validate.