Commit 3651e1e6767f60cf9960b5b8d8e1f3958a476de6
Committed by
Rafael Manzo
1 parent
0401676c
Exists in
colab
and in
4 other branches
Numericaly validation for end and begging
Pending improve acceptance test and customize the error message
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/models/mezuro_range.rb
| ... | ... | @@ -5,8 +5,8 @@ class MezuroRange < KalibroGem::Entities::Range |
| 5 | 5 | |
| 6 | 6 | attr_accessor :beginning, :end, :reading_id, :mezuro_configuration_id, :comments |
| 7 | 7 | |
| 8 | - validates :beginning, presence: true, beginning_uniqueness: true | |
| 9 | - validates :end, presence: true #TODO: Validates numeracy | |
| 8 | + validates :beginning, presence: true, beginning_uniqueness: true, numericality: true | |
| 9 | + validates :end, presence: true , numericality: true | |
| 10 | 10 | validates :reading_id, presence: true |
| 11 | 11 | |
| 12 | 12 | end | ... | ... |