Sha256: 5d0f3dbb3bd512f9a0cb76fadd182c0fa606d1e9e70a5e2809b2c5963187e89c
Contents?: true
Size: 547 Bytes
Versions: 7
Compression:
Stored size: 547 Bytes
Contents
module Arbetsformedlingen ApplicationMethodSchema = Dry::Validation.Form do configure do config.type_specs = true config.messages_file = File.expand_path('../../../../config/locales/errors.yml', __FILE__) predicates(Predicates) end required(:external, Types::Bool).filled required(:summary, Types::StrippedString).filled required(:url, Types::StrippedString).filled(:url?) end class ApplicationMethod < Model def initialize(hash) super(ApplicationMethodSchema.call(hash)) end end end
Version data entries
7 entries across 7 versions & 1 rubygems