internal override void Validate(Schema.Definition.Property propIn, object value) { string sVal = value as string; if (sVal.Length < this.Value) { throw new ObjectException(this.CustomMessage, propIn.Schema.ClassName, propIn.Name, this.Value); } }
internal override void Validate(Schema.Definition.Property propIn, object value) { string sVal = value as string; if (!System.Text.RegularExpressions.Regex.IsMatch(sVal, this.Value)) { throw new ObjectException(this.CustomMessage, propIn.Schema.ClassName, propIn.Name, this.Value); } }
internal override void Validate(Schema.Definition.Property propIn, object value) { var dVal = Convert.ToDouble(value); if (dVal < this.From || dVal > this.To) { throw new ObjectException(this.CustomMessage, propIn.Schema.ClassName, propIn.Name, this.From, this.To); } }
internal override bool CanApplyToProperty(Schema.Definition.Property propIn) { return(TypeHelper.IsString(propIn.Type)); }