Click or drag to resize

StringLengthAttribute Class

EDI DOM validation attribute for the correct length of data elements. The range in which the data element length is considered valid according to the EDI rule. Counts empty spaces. For data elements of type X12 N, X12 R or EDIFACT N, decimal points and minus sign are excluded.
Inheritance Hierarchy

Namespace:  EdiFabric.Core.Annotations.Validation
Assembly:  EdiFabric.Core (in EdiFabric.Core.dll) Version: 1.0.0.0 (9.7.7.0)
Syntax
public class StringLengthAttribute : ValidationAttribute

The StringLengthAttribute type exposes the following members.

Constructors
  NameDescription
Public methodStringLengthAttribute
Initializes a new instance of the StringLengthAttribute class.
Top
Properties
  NameDescription
Public propertyMaxLen
The maximum allowed length.
Public propertyMinLen
The minimum allowed length.
Top
Methods
  NameDescription
Public methodValidateEdi
Detects if an EDI data element has the correct length according to its EDI rule.
(Overrides ValidationAttributeValidateEdi(ValidationContext).)
Top
Extension Methods
  NameDescription
Public Extension MethodValidate(SyntaxSet, Char)Overloaded.
Validates an EDI item according to its EDI DOM validation attributes.
(Defined by ValidationExtensions.)
Public Extension MethodValidate(Int32, SyntaxSet, Char, Int32)Overloaded.
Validates an item according to its EDI DOM validation attributes. This is internally called to validate an EdiMessage.
(Defined by ValidationExtensions.)
Top
See Also