Skip Validations in Specific Contexts with except_on

Rails 8.0 added except_on as an option to validations . It’s the inverse of on: and lets you skip validations in specific contexts. Instead of… …skipping all validations in your controller: class Admin::UsersController < ApplicationController def create @user = User . new ( user_params ) if @user . save ( validate: false ) # Skips ALL validations! redirect_to admin_users_path else render :new end…