三輪 大河
ActiveModel::Validatorを使って複数のモデルで使えるバリデーションルールを定義する方法
ActiveModel::EachValidatorを使って複数のモデルで使えるバリデーションルールを定義する ActiveModel::EachValidator編