/** * validates * * @param string $options An optional array of custom options to be made available in the beforeValidate callback * @return boolean True if there are no errors */ public function validates($options = array()) { $result = parent::validates($options); if (isset($this->validationErrors['password'])) { $this->invalidate('password_1'); $this->invalidate('password_2'); } return $result; }
function validates() { // convert database format. $this->hours(); $this->spent_on(); return parent::validates(); }
function validates() { // convert database format. $this->estimated_hours(); # if self.due_date.nil? && @attributes['due_date'] && !@attributes['due_date'].empty? # errors.add :due_date, :activerecord_error_not_a_date # end # # if self.due_date and self.start_date and self.due_date < self.start_date # errors.add :due_date, :activerecord_error_greater_than_start_date # end # # if start_date && soonest_start && start_date < soonest_start # errors.add :start_date, :activerecord_error_invalid # end return parent::validates(); }