lib/fanforce/validations/validations.rb in fanforce-validations-0.4.1 vs lib/fanforce/validations/validations.rb in fanforce-validations-0.4.2
- old
+ new
@@ -75,10 +75,10 @@
def validates_format_of_external_id(*args)
_external_id = args.first
opts = extract_options!(args).merge(:field => :_external_id)
params = extract_validation_params(opts)
- if is_present?(_external_id) and _external_id.include?('/')
+ if _external_id.to_s.include?('/')
opts[:message] = '_external_id contains one or more forward slashes (/), which is not allowed'
else
return true
end
\ No newline at end of file