public RequiredIfAttribute(string dependentProperty, Operator @operator, object dependentValue) : base(dependentProperty) { Operator = @operator; DependentValue = dependentValue; Metadata = OperatorMetadata.Get(Operator); }
public IsAttribute(Operator @operator, string dependentProperty) : base(dependentProperty) { Operator = @operator; PassOnNull = false; _metadata = OperatorMetadata.Get(Operator); }
public MaxElementsIfAttribute(uint elements, string dependentProperty, Operator @operator, object dependentValue) : base(dependentProperty) { Operator = @operator; DependentValue = dependentValue; Metadata = OperatorMetadata.Get(Operator); MaxElements = new MaxElementsAttribute(elements); }
public override bool IsValid(object value, object dependentValue, object container) { if (Metadata.IsValid(dependentValue, DependentValue)) { return(OperatorMetadata.Get(Operator.RegExMatch).IsValid(value, Pattern)); } return(true); }