# Change the validation message for a type

**URL:** <https://discourse.dry-rb.org/t/change-the-validation-message-for-a-type/771>\
**Category:** dry-validation\
**Created:** [May 6, 2019, 12:48pm UTC](https://discourse.dry-rb.org/t/change-the-validation-message-for-a-type/771 "2019-05-06T12:48:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnagir](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.dry-rb.org/dnagir/32/372_2.png) [@dnagir](https://discourse.dry-rb.org/u/dnagir)\
**Post date:** [May 6, 2019, 12:48pm UTC](https://discourse.dry-rb.org/t/change-the-validation-message-for-a-type/771/1 "2019-05-06T12:48:29Z")

</div>

Hello,

I’m wonder how can I customise the error message against the type value in this example?

```ruby
class SaveValidation < Dry::Validation::Contract
  config.configure do |c|
    c.messages.load_paths << File.join( __dir__ , 'save_validation_messages.yml')
  end

  module T
    include Dry.Types()
    TimeOfDay = Constructor(Tod::TimeOfDay) { |str| Tod::TimeOfDay.parse(str) } # tod gem
  end

  params do
    required(:pickup_time).value(T::TimeOfDay)
  end
end

```

The error message against `pickup_time` is `["must be Tod::TimeOfDay"]`.  
Is it possible to provide a more useful message in this case and if so I would appreciate any pointers 🙏

Cheers,  
D.
