lib/water_drop/contracts/message.rb in waterdrop-2.0.0.rc1 vs lib/water_drop/contracts/message.rb in waterdrop-2.0.0

- old
+ new

@@ -4,10 +4,10 @@ module Contracts # Contract with validation rules for validating that all the message options that # we provide to producer ale valid and usable class Message < Dry::Validation::Contract # Regex to check that topic has a valid format - TOPIC_REGEXP = /\A(\w|\-|\.)+\z/.freeze + TOPIC_REGEXP = /\A(\w|-|\.)+\z/.freeze # Checks, that the given value is a string STRING_ASSERTION = ->(value) { value.is_a?(String) }.to_proc private_constant :TOPIC_REGEXP, :STRING_ASSERTION