def valid!(original, sanitized, fallback = nil, options = {})
      return sanitized unless sanitized.nil?
      unless original.nil?
        raise ValidationError, options[:invalid_error] % original.inspect
      end
      return instance_variable_get(fallback) if fallback_exist?(fallback)
      return yield if block_given?
      raise ValidationError, options[:required_error] if options[:required]
    end
def valid!(original, sanitized, fallback = nil, options = {})
      return sanitized unless sanitized.nil?
      unless original.nil?
        raise ValidationError, options[:invalid_error] % original.inspect
      end
      return instance_variable_get(fallback) if fallback_exist?(fallback)
      return yield if block_given?
      raise ValidationError, options[:required_error] if options[:required]
    end
This method requires a validation to succeed, raising an exception if it
 does not. If no original value was provided, it returns, in this order,
 the given fallback, the return value of any block passed to this method,
 or, finally, +nil+, unless the +:required+ option is set, in which case
 a +ValidationError+ is raised.

 @param original [Object] the original value
 @param sanitized [Object] the sanitized value
 @param fallback [Object] an optional symbol representing an instance
                          variable to be returned when the original value
                          is +nil+
 @raise [ValidationError] if the sanitization failed. The error message may
                          be set using the +:invalid_error+ option.
 @raise [ValidationError] if the +:required+ option is set, but neither an
                          original value nor a fallback value was specified
                          and no block was given. The error message may be
                          set using the +:required_error+ option.
 @param options [Hash] a hash optionally containing additional settings.