# File lib/json-schema/validator.rb, line 223
    def validate()
      begin
        @base_schema.validate(@data,[],self,@validation_options)
        if @validation_options[:clear_cache] == true
          Validator.clear_cache
        end
        if @options[:errors_as_objects]
          return @errors.map{|e| e.to_hash}
        else
          return @errors.map{|e| e.to_string}
        end
      rescue JSON::Schema::ValidationError
        if @validation_options[:clear_cache] == true
          Validator.clear_cache
        end
        raise $!
      end
    end