File: user_with_custom_message.rb

package info (click to toggle)
ruby-validate-url 1.0.2%2Bgit-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 172 kB
  • sloc: ruby: 302; makefile: 4
file content (7 lines) | stat: -rw-r--r-- 145 bytes parent folder | download
1
2
3
4
5
6
7
class UserWithCustomMessage
  include ActiveModel::Validations

  attr_accessor :homepage

  validates :homepage, :url => {message: "wrong"}
end