 
   'null':
     # null sort of isnt supported. It will just unset in this case
-    coercion: (keyPath, value, schema) ->
+    coerce: (keyPath, value, schema) ->
       throw new Error("Validation failed at #{keyPath}, #{JSON.stringify(value)} must be null") unless value == null
       value
 
   'object':
-    coercion: (keyPath, value, schema) ->
+    coerce: (keyPath, value, schema) ->
       throw new Error("Validation failed at #{keyPath}, #{JSON.stringify(value)} must be an object") unless isPlainObject(value)
       return value unless schema.properties?
 

        value

  '*':
    minimumAndMaximumCoercion: (keyPath, value, schema) ->
      return value unless typeof value is 'number'
      if schema.minimum? and typeof schema.minimum is 'number'
        value = Math.max(value, schema.minimum)

        value = Math.min(value, schema.maximum)
      value

    validateEnum: (keyPath, value, schema) ->
      possibleValues = schema.enum
      return value unless possibleValues? and Array.isArray(possibleValues) and possibleValues.length

