Does coerce still work?
markalanevans opened this issue · comments
Mark Evans commented
I add this to my api.rb
use Goliath::Rack::Validation::CoerceValue, :key => 'url', :as => ValidUrl
And required this class /libs/valid_url.rb in my runner.rb.
class ValidUrl
def coerce value, opts ={}
raise Goliath::Rack::Validation::FailedCoerce.new([400, {}, "URL is invalid"])
end
end
The exception is never thrown. Am I missing something else?