Sha256: f42ada9217ccfefc94ce78651319475c4549bf141adf7456f3654ef0fa001624
Contents?: true
Size: 254 Bytes
Versions: 9
Compression:
Stored size: 254 Bytes
Contents
class AttachmentPresenceValidator < RailsUploads::Validators::Base def validate_each(record, attribute, value) unless value.present? and value.exists? add_error record, attribute, 'errors.messages.attachment_presence' end end end
Version data entries
9 entries across 9 versions & 1 rubygems