Date Validation

I am trying to validate a date field from within my model file but
running into some issues. If I put invalid data in a textbox on a form,
by the time it gets to my validate method, something has already emptied
the data out because it does not meet the data type specs (date field).
I could
validate in the controller before I call a save, but then I can’t add to
the errors collection and this doesn’t seem like the best practice
either. Does anyone have any suggestions? I am not using drop down lists
for the date fields, just a plain textbox which is needed for the
business requiremnet. Thanks for any advice!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs