Attributes require constant expressions (such as literals or const fields). The data for the attribute is baked into the source code at the point of compilation. You cannot change that data after compilation. This is by design. Attributes are describing members/types, not instances or values. A single instance of the attribute (for each occurrence in the code) is created at the point it is first requested and that instance is used for all calls. It is not in any way associated with any instance of the type you might be applying it to. Therefore you cannot do what you are asking for here.
If you wanted a "dynamic" range you'll have to create your own validation attribute and build in logic to do this. Since you cannot reference non-constant values you'll need to pass the name of the property (e.g. nameof(ItemsNumbers)
) to the constructor of the attribute. Then in your attribute's validation logic you'll need to dynamically look up the property based upon the instance value that is given to the attribute as part of the validation call (it is a parameter). A good example of how to do this is by looking at the Compare attribute.