From d2bc1b949752a6220f7f58f38bc143b78ee9c31f Mon Sep 17 00:00:00 2001 From: hachi8833 Date: Thu, 2 Jan 2025 13:26:26 +0900 Subject: [PATCH] [ci-skip][docs] Fix sample for `:allow_blank` --- guides/source/active_record_validations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md index 1a2b2e4784e72..08fb4fe4d1439 100644 --- a/guides/source/active_record_validations.md +++ b/guides/source/active_record_validations.md @@ -1156,7 +1156,7 @@ empty string for example. ```ruby class Topic < ApplicationRecord - validates :title, length: { is: 5 }, allow_blank: true + validates :title, length: { is: 6 }, allow_blank: true end ``` @@ -1166,7 +1166,7 @@ irb> Topic.create(title: "").valid? irb> Topic.create(title: nil).valid? => true irb> Topic.create(title: "short").valid? -=> false # 'short' is not of length 5, so validation fails even though it's not blank +=> false # 'short' is not of length 6, so validation fails even though it's not blank ``` ### `:message`