Sha256: 3bc1d7e60a6c8ce820be890209a2c3bf871e15d98104f513a12ac3baf32d0085
Contents?: true
Size: 681 Bytes
Versions: 7
Compression:
Stored size: 681 Bytes
Contents
require 'dry/validation' require 'dry/validation/schema' module Locabulary # Responsible for providing a defined and clear schema for each of the locabulary items. Schema = Dry::Validation.Schema do required(:predicate_name).filled(format?: /\A[a-z_]+\Z/) required(:values).each do required(:term_label).filled(:str?) optional(:description).maybe(:str?) optional(:grouping).maybe(:str?) optional(:affiliation).maybe(:str?) optional(:default_presentation_sequence).maybe(:int?) required(:activated_on).filled(format?: /\A\d{4}-\d{2}-\d{2}\Z/) optional(:deactivated_on).maybe(format?: /\A\d{4}-\d{2}-\d{2}\Z/) end end end
Version data entries
7 entries across 7 versions & 1 rubygems