Sha256: a96e37a9a97ed7ce12d7219cf04fa8642bfbe64bcd97818465ee60fd27272b80
Contents?: true
Size: 182 Bytes
Versions: 11
Compression:
Stored size: 182 Bytes
Contents
class RequiredField def validate(form, key) return if form[key] and not( form[key].empty?) form.invalid(key, RequiredFieldError.new) end end class RequiredFieldError end
Version data entries
11 entries across 11 versions & 2 rubygems