Rails 4: Errors on forms due to AR validations
validates_presence_of :name
object.errors
will contain an array of errors that
the validation will add# Useful error methods
object.errors.clear
object.errors.size
object.errors.each {|attr, mesg| ...}
# attr: name
# msg: name can't be blank
#returns complete sentences of the attribute and it errors
object.errors.full_messages.each {|msg| ...}