edit app/models/schedule.rb

add validates
edit app/models/task.rb

add validates
edit models

fix validates