Inputs for @task that fail validations, don't go under field_with_errors, no change of classes
class Task < ActiveRecord::Base
#VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
validates :title, presence:true ,
validates :date_of_task, presence: true
#validates :email, format: { with: VALID_EMAIL_REGEX }
end
is there any pre configuration that should be made to start putting failed validation inputs under that class ?
Aucun commentaire:
Enregistrer un commentaire