mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-25 07:16:41 +00:00
set value nil if invalid
This commit is contained in:
@@ -39,6 +39,7 @@ module ValidatesTimeliness
|
||||
end
|
||||
end
|
||||
rescue
|
||||
record.send(attr_name + "=", nil)
|
||||
record.errors.add(attr_name, "is not a valid time")
|
||||
next
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user