lib/fanforce/validations/validations.rb in fanforce-internal-validations-0.1.7 vs lib/fanforce/validations/validations.rb in fanforce-internal-validations-0.1.8
- old
+ new
@@ -53,11 +53,10 @@
errors = [format_validation_error(opts, invalid_fields, :invalid_data)]
raise_validation_errors(opts, errors, Fanforce::Error::BadRequest)
end
-
def validates_true(*args)
opts = extract_options!(args)
params = extract_validation_params(opts)
bools_to_validate = args.is_a?(Array) ? args : [args]
@@ -94,10 +93,10 @@
elsif is_present?(opts[:field])
opts[:fields] = [opts.delete(:field)]
end
return opts
elsif args.last.is_a?(::String)
- {msg: args.pop.to_s}
+ {message: args.pop.to_s}
else
{}
end
end
\ No newline at end of file