Class Validation
- Namespace
- Dynamicweb.Ecommerce.Orders.Validation
- Assembly
- Dynamicweb.Ecommerce.dll
The class Validation represents order validation service.
[Serializable]
public class Validation
- Inheritance
-
Validation
- Inherited Members
Constructors
Validation()
Initializes a new instance of the Validation class.
public Validation()
Validation(IDataReader)
Initializes a new instance of the Validation class.
public Validation(IDataReader dataReader)
Parameters
dataReader
IDataReader- The data reader.
Properties
FieldName
Gets or sets the validation field name.
public string FieldName { get; set; }
Property Value
FieldType
Gets or sets the validation field type.
public ValidationFieldType FieldType { get; set; }
Property Value
GroupId
Gets or sets the validation group id.
public string GroupId { get; set; }
Property Value
Id
Gets or sets the validation id.
public string Id { get; set; }
Property Value
Rules
Gets or sets the validation rules.
public RuleCollection Rules { get; set; }
Property Value
UseAndOperator
Gets or sets value indicating whether to use and operator during validation process.
public bool UseAndOperator { get; set; }
Property Value
Methods
Delete()
Deletes this validation.
public void Delete()
Delete(bool)
Deletes this validation.
public void Delete(bool doKillCache)
Parameters
doKillCache
bool- Sets value indication whether to clear the caches after delete.
GetTranslatedName()
Gets the validation field translated name.
public string GetTranslatedName()
Returns
GetValidationById(string)
Gets the validation by id.
public static Validation GetValidationById(string id)
Parameters
id
string- The validation id.
Returns
GetValidations(string)
Gets the validations by validation group id.
public static ValidationCollection GetValidations(string validationGroupId)
Parameters
validationGroupId
string- The validation group id.
Returns
GetValidations(string[])
Gets the validations by validation ids.
public static ValidationCollection GetValidations(string[] ids)
Parameters
ids
string[]- The validation ids.
Returns
GetValidationsBySql(string)
Gets the validations by sql query.
public static ValidationCollection GetValidationsBySql(string query)
Parameters
query
string- The sql query.
Returns
Save()
Saves this validation.
public void Save()
Save(bool)
Saves this validation.
public void Save(bool doKillCache)
Parameters
doKillCache
bool- Sets value indication whether to clear the caches after save.
Validates(string)
Validates value through all the Rules.
public bool Validates(string value)
Parameters
value
string- The value to validate.
Returns
Remarks
If UseAndOperator is set to
true
then all the rules must be valid, otherwise - at least one of them.