Hi
Is there a simple way to define Min and Max and use Doubles ?
For example any double between -2.000 and +2.000
Have {number:-2-2}, great if we dont need decimals.
Have {double:-1.3}, great but I would have to check the range myself.
cheers
Martin
I am talking to myself, I am going to convert my own mask {double:-2.00-2.00} and use ValueConstraint
{ public double Min { get; set; } public double Max { get; set; } public new string Mask { get { return base.Mask; } set { base.Mask = "-n.nnn"; ValueConstraint constraint = new ValueConstraint(); constraint.MinInclusive = Min; constraint.MaxInclusive = Max; base.ValueConstraint = constraint; } } }
{
public double Min { get; set; } public double Max { get; set; } public new string Mask
public double Min { get; set; }
public double Max { get; set; }
public new string Mask
get { return base.Mask; }
get
return base.Mask;
}
set { base.Mask = "-n.nnn"; ValueConstraint constraint = new ValueConstraint(); constraint.MinInclusive = Min; constraint.MaxInclusive = Max; base.ValueConstraint = constraint; } }
set { base.Mask = "-n.nnn"; ValueConstraint constraint = new ValueConstraint(); constraint.MinInclusive = Min; constraint.MaxInclusive = Max; base.ValueConstraint = constraint; }
set
base.Mask = "-n.nnn"; ValueConstraint constraint = new ValueConstraint(); constraint.MinInclusive = Min; constraint.MaxInclusive = Max; base.ValueConstraint = constraint;
base.Mask = "-n.nnn";
ValueConstraint constraint = new ValueConstraint();
constraint.MinInclusive = Min;
constraint.MaxInclusive = Max;
base.ValueConstraint = constraint;