mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
fix error message
This commit is contained in:
parent
8aa5d5e4f5
commit
1799ab9bf5
@ -6,7 +6,7 @@ class Coupon < ActiveRecord::Base
|
|||||||
|
|
||||||
validates :name, presence: true
|
validates :name, presence: true
|
||||||
validates :code, presence: true
|
validates :code, presence: true
|
||||||
validates :code, format: { with: /\A[A-Z0-9\-]+\z/ ,message: 'only caps letters and numbers'}
|
validates :code, format: { with: /\A[A-Z0-9\-]+\z/ ,message: 'only caps letters, numbers, and dashes'}
|
||||||
validates :code, uniqueness: true
|
validates :code, uniqueness: true
|
||||||
validates :percent_off, presence: true
|
validates :percent_off, presence: true
|
||||||
validates :percent_off, :inclusion => 0..100
|
validates :percent_off, :inclusion => 0..100
|
||||||
|
Loading…
Reference in New Issue
Block a user