Ejemplo n.º 1
0
 public FieldDefinition(string name, CustomCheck check)
 {
     Name         = name;
     CustomChecks = new List <CustomCheck>()
     {
         check
     };
 }
Ejemplo n.º 2
0
 public FieldDefinition(string name, bool allowedBlank = true, bool trimField = true, string disallowedChars = "", string allowedChars = "", int minLength = 0, int maxLength = int.MaxValue, CustomCheck check = null, string regex = null, string[] allowedValues = null)
 {
     Name                 = name;
     AllowedBlank         = allowedBlank;
     TrimField            = trimField;
     MaxLength            = maxLength;
     MinLength            = minLength;
     DisallowedCharacters = disallowedChars;
     AllowedCharacters    = allowedChars;
     CustomChecks         = new List <CustomCheck>();
     if (check != null)
     {
         CustomChecks.Add(check);
     }
     if (!string.IsNullOrWhiteSpace(regex))
     {
         RegEx = regex;
     }
     AllowedValues = allowedValues;
 }