 
     if isValid @query, "object"
       queryTypes = @query
-
       Object.keys(queryTypes).forEach (key) ->
-        type = queryTypes[key]
-        if type is Number
-          queryTypes[key] = stringToNumber
-        else if type is Boolean
-          queryTypes[key] = stringToBoolean
-        return
-
+        queryTypes[key] = valido.get queryTypes[key]
       return (req, res) -> Promise.try ->
-        return error if error = validateTypes req.query, queryTypes
+        return error if error = validateQuery req.query, queryTypes
         return responder.call req, req.query, res
 
     if @body is yes


    if isValid @body, "object"
      bodyTypes = @body
      return (req, res) ->
        readBody(req).then ->
          return Error "Missing body" unless req.body

#
# Helpers
#

createRegex = (pattern) ->
  paramRE = /:[^\/]+/gi
