/// <summary> /// Constructs a Required Operation for a section /// </summary> /// <param name="sectionName"></param> /// <returns></returns> public SectionFieldValidationOperation RequiredSectionOperation(string sectionName) { var operation = new SectionFieldValidationOperation { SectionName = sectionName }; return(operation); }
public SectionFieldValidationOperation SectionDoesNotExistOperation(string sectionName) { var operation = new SectionFieldValidationOperation { SectionName = sectionName, OperationType = ValidationOperationType.SectionDoesNotExist }; return(operation); }
/// <summary> /// Constructs a Comparison Operation for a section's field /// </summary> /// <param name="field">Field in the condition's section that will be evaluated</param> /// <param name="values">Value to compare when performing the operation</param> /// <returns></returns> public SectionFieldValidationOperation RequiredSectionFieldOperationComparison(ValidationField field, List <string> values) { var operation = new SectionFieldValidationOperation { SectionName = field.SectionName, FieldPath = field.FieldPath, OperationType = ValidationOperationType.SectionExists, SectionFieldOperationType = ValidationOperationType.Comparison, ContainsValues = values, ControlType = field.ControlType, PropertyOverride = field.PropertyOverride }; return(operation); }