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
SystemObject
  SystemAttribute
    EdiFabric.Core.Annotations.ValidationValidationAttribute
      EdiFabric.Core.Annotations.ValidationStringLengthAttribute

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

The StringLengthAttribute type exposes the following members.

Constructors
 NameDescription
Public methodStringLengthAttribute(Int32) Initializes a new instance of the StringLengthAttribute class.
Public methodStringLengthAttribute(Int32, Int32) Initializes a new instance of the StringLengthAttribute class.
Public methodStringLengthAttribute(Int32, Boolean, Char) Initializes a new instance of the StringLengthAttribute class.
Public methodStringLengthAttribute(Int32, Int32, Boolean, Char) Initializes a new instance of the StringLengthAttribute class.
Top
Properties
 NameDescription
Public propertyMaxLen The maximum allowed length.
Public propertyMinLen The minimum allowed length.
Public propertyPadChar The padding char.
Public propertyPadLeft The padding direction, right by default.
Top
Methods
 NameDescription
Public methodValidateEdi Detects if an EDI data element has the correct length according to its EDI rule.
(Overrides ValidationAttributeValidateEdi(ValidationContext))
Top
See Also