RequiredIfAttribute class
Value must exist if another property has a value.
[AttributeUsage(AttributeTargets.All)]
public class RequiredIfAttribute : ValidationAttributeBase
Public Members
name | description |
---|---|
RequiredIfAttribute(…) | |
OtherProperty { get; } | Property value that must exist in order to trigger the validation check. |
override AddValidation(…) |
Protected Members
name | description |
---|---|
override GetErrorMessage() | |
override IsValid(…) |
See Also
- class ValidationAttributeBase
- namespace Amica