Click or drag to resize

RequiredIfAttribute Class

EDI DOM validation attribute for required if EDI data elements. Used for HIPAA SNIP Type 4. When the element at the specified position is equal to one of the specified codes, then the annotated element must be not null.
Inheritance Hierarchy
SystemObject
  SystemAttribute
    EdiFabric.Core.Annotations.ValidationValidationAttribute
      EdiFabric.Core.Annotations.ValidationRequiredIfAttribute

Namespace: EdiFabric.Core.Annotations.Validation
Assembly: EdiFabric (in EdiFabric.dll) Version: 1.0.0
Syntax
public class RequiredIfAttribute : ValidationAttribute

The RequiredIfAttribute type exposes the following members.

Constructors
 NameDescription
Public methodRequiredIfAttribute Initializes a new instance of the RequiredIfAttribute class.
Top
Properties
 NameDescription
Public propertyCodes The codes to check for.
Public propertyPosition The position of the element to check.
Top
Methods
 NameDescription
Public methodValidateEdi Detects if an EDI data element is valid according to its condition.
(Overrides ValidationAttributeValidateEdi(ValidationContext))
Top
Example
In EB segment, if EligibilityorBenefitInformation_01 is "A" then BenefitAmount_07 must be provided.
See Also