# File app/models/timeslot.rb, line 184 def tolerances_correctly_formatted [:tolerance_pre, :tolerance_post].each do |attr| field = self.send(attr) field.nil? or field.blank? or field =~ /^\d\d?:\d\d(:\d\d)?$/ or errors.add(field, _('Wrong format (should be hh:mm or hh:mm:ss)')) end end