Sha256: 6a61cf519781413153edcce6c2c65d6d4a91be6c9833e8f5e27627acf417bebe
Contents?: true
Size: 266 Bytes
Versions: 10
Compression:
Stored size: 266 Bytes
Contents
class MembershipNumberFormatValidator < ActiveModel::EachValidator def validate_each(object, attribute, value) unless value =~ /\A(620272)(\d){10}\z/ object.errors[attribute] << (options[:message] || "must be a valid membership number") end end end
Version data entries
10 entries across 10 versions & 1 rubygems