flash-gordon on v1.3.3
flash-gordon on master
Bump version to 1.3.3 (compare)
flash-gordon on master
Update CHANGELOG (compare)
flash-gordon on master
Halt with mutable backtrace Ex… Merge pull request #116 from jo… (compare)
Another probably stupid question ;]
require "dry-validation"
module Validations
PostValidator = Dry::Validation.Form do
required(:title) { filled? & str? }
required(:body){ filled? & str? }
end
end
if I have Validator like this how I can use it with AutoInject? There is no method new
to call by it, t's just a function. I need to mark it somehow or do sth else?
Blog::Container["validations.post_validator"]
NoMethodError: undefined method `new' for #<#<Class:0x007fdbb0c8b1b0>:0x007fdbb0bf2898>
from /Users/gotar/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/dry-component-0bebc656b625/lib/dry/component/loader.rb:42:in `instance'
require "dry-validation"
module Validations
class PostValidator
PostSchema = Dry::Validation.Form do
required(:title) { filled? & str? }
required(:body){ filled? & str? }
end
def call(args)
PostSchema.call(args)
end
end
end