Function restrictedNumber

Requires a real, finite number. If one or more values and/or ranges are specified, the value must also be equal to one of the specified values or in one of the specified ranges. If one or more divisors are specified, the value must also be divisible by one of the specified divisors.