public override PropertyConstraintViolationError Validate(object value, PropertyDefinition propertyDefinition, IPropertyBag propertyBag) { IPvxAddress pvxAddress = new IPvxAddress(0UL, this.maxIPRange); IPRange iprange = value as IPRange; if (iprange != null && pvxAddress.CompareTo(iprange.Size) < 0) { return(new PropertyConstraintViolationError(DataStrings.ConstraintViolationIpRangeNotAllowed(iprange.ToString(), this.maxIPRange), propertyDefinition, value, this)); } return(null); }