We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3507b8b commit e71b8c9Copy full SHA for e71b8c9
app/models/calil/barcode.rb
@@ -0,0 +1,12 @@
1
+module Calil
2
+ class Barcode
3
+ include ActiveModel::Model
4
+ attr_accessor :name, :initial_number, :number_of_sheets
5
+
6
+ with_options presence: true do
7
+ validates :name # 図書館名
8
+ validates :initial_number # 開始番号
9
+ end
10
+ validates :number_of_sheets, numericality: { greater_than_or_equal_to: 0 } # 枚数
11
12
+end
0 commit comments