Th RuleRange attribute demands that a particular IComparable property's value falls within the specified range. Here, this rule is applied to the following properties: - "FromOneToFive" must be set to a value that is greater than 1 and less than 5, inclusive; - "During2008" must be set to a date that falls within the year 2008. - "LastSevenDays" must be set to a date that falls within the last seven days. Here, built-in XPO functions (AddDays and LocalDateTimeToday) are demonstrated. - "Collection": the sum of all the collection elements' SumBetween0And50 property values must be greater than 0 and less than 50, inclusive; - "Collection": the collection must contain at least one element with the AtLeastOneValueWithinFirstWeekOf2009 property set to a date within the first week of the year 2009. To check this rule, save the current object.
|