mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-22 22:06:45 +00:00
tiny clean up
This commit is contained in:
parent
162faf632a
commit
899e96b880
@ -37,15 +37,8 @@ module ValidatesTimeliness
|
|||||||
|
|
||||||
return if (raw_value.nil? && configuration[:allow_nil]) || (raw_value.blank? && configuration[:allow_blank])
|
return if (raw_value.nil? && configuration[:allow_nil]) || (raw_value.blank? && configuration[:allow_blank])
|
||||||
|
|
||||||
if raw_value.blank?
|
return add_error(record, attr_name, :blank) if raw_value.blank?
|
||||||
add_error(record, attr_name, :blank)
|
return add_error(record, attr_name, "invalid_#{type}".to_sym) if value.nil?
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if value.nil?
|
|
||||||
add_error(record, attr_name, "invalid_#{type}".to_sym)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
validate_restrictions(record, attr_name, value)
|
validate_restrictions(record, attr_name, value)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user