mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-23 06:16:44 +00:00
set value nil if invalid
This commit is contained in:
parent
dff7900c4a
commit
8072fe733e
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user