mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-25 15:22:58 +00:00
fix for validation nil value with :format option plugin parser disabled (issue 34)
This commit is contained in:
@@ -56,6 +56,7 @@ module ValidatesTimeliness
|
||||
end
|
||||
|
||||
def parse(value)
|
||||
return nil if value.nil?
|
||||
if ValidatesTimeliness.use_plugin_parser
|
||||
Timeliness::Parser.parse(value, @type, :zone => (:current if @timezone_aware), :format => options[:format], :strict => false)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user