class Pod4::ValidationError

Raised if validation fails (and you wanted an exception…)

Attributes

field[R]

Public Class Methods

from_alert(alert) click to toggle source
# File lib/pod4/errors.rb, line 85
def self.from_alert(alert)
  self.new(alert.message, alert.field)
end
new(message=nil, field=nil) click to toggle source
Calls superclass method Pod4::Pod4Error::new
# File lib/pod4/errors.rb, line 89
def initialize(message=nil, field=nil)
  super(message || $! && $!.message)
  @field = field.to_s.to_sym
end