ruby - Date validations -


Hi guys, I'm having trouble validating the date if this is incorrect. If I search for a record for the database on February 31, it only shows an error in the server, and it does not show anything .. I do not have a clue that please help ...

< P> My code for saving my hash date @start = "# {params [: start] [: day]} - # {params [: start] [: months]} - # {params [ : Start] [: year]} " for more passing` @ start_date = date.parse (@start)

`and it determines that the date passed is incorrect and Give it to me Does not give chance to do it.

date. Equality increases an argument If you want you can save the error instead of preventing it from being executed to answer it. However, it would be better to conduct a prudent investigation before trying to parse the date in the first place.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -