# File lib/cgikit/api.rb, line 58
  def validate( associations, component_name, element_name )
    errors = []
    bindings = @bindings.values
    target = bindings + @validations
    target.each do |t|
      begin
        t.validate(associations, component_name, element_name, @element_type)
      rescue ValidationError => e
        errors << e
      end
    end

    if errors.empty? then
      nil
    else
      errors
    end
  end