[FIX #589] Force birthdate format when saving
This commit is contained in:
parent
1aabc6c82b
commit
03fde0a502
5 changed files with 25 additions and 16 deletions
|
@ -2,4 +2,5 @@ class Individual < ActiveRecord::Base
|
|||
belongs_to :dossier
|
||||
|
||||
validates_uniqueness_of :dossier_id
|
||||
validates :birthdate, format: { with: /\A\d{4}\-\d{2}\-\d{2}\z/, message: "La date n'est pas au format AAAA-MM-JJ" }, allow_nil: true
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue