Now that Ruby 2.7 has added the support for beginless range, Rails 7 also adds support to include the beginless range in ActiveRecord inclusivity/exclusivity validators.

Prior to Rails 7, if we were to add a validation to a Product model where the price needs to be within 5000, we’d have to follow this method-

#### Before

Also, if we would try adding beginless range, then it will throw an error.

As it can be seen, it throws an error saying cannot get the first element of beginless range.

#### After

After Rails 7, we can now add the beginless range.

Check out the PR for more details.