I’m developing a Ruby on Rails application that has table attributes with special requirements. In the form they need to provide me a very special kind of date format.
the format in question is:
Year.month.day
I prefer to use the validates :format helper of Rails to make it a little cleaner, but i’m not very good with regular expressions. Any idea that enlights me?
Try
Not the best practice. Also all this forget about bissext year and month’s number of days