fetprofile validated date

This commit is contained in:
2015-04-21 17:17:01 +02:00
parent f0bb767ba4
commit c6574cee00

View File

@@ -35,8 +35,14 @@ class Fetprofile < ActiveRecord::Base
unless Date.valid_date?((birth_year.nil?) ? Date.today.year : birth_year, birth_month, birth_day) unless Date.valid_date?((birth_year.nil?) ? Date.today.year : birth_year, birth_month, birth_day)
errors.add(:birth_month, "Invalides Datum") errors.add(:birth_month, "Invalides Datum")
errors.add(:birth_day, "Invalides Datum") errors.add(:birth_day, "Invalides Datum")
v= false
else
v= true
end end
else
v= false
end end
v
end end
def title def title