Suppose I have a model class which has a time field:
class CreateAppointments < ActiveRecord::Migration
create_table :appointments do |t|
When I test drive it in rails console, I can input any value int he
startTime and endTime such as:
a = Appointment.new()
a.startTime = 1234
a.endTime = 5678
My question is does Rails support some basic data type validation for us
so that we can always input a correct format?
Posted via http://www.ruby-forum.com/.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to email@example.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.