From 601c603bbe654bac2444e4df6e26cb7f0463da47 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Wed, 24 Sep 2014 12:47:06 -0700 Subject: [PATCH] :memo: --- src/config.coffee | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/config.coffee b/src/config.coffee index 8b26ad2f4..6e7fdbef4 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -398,6 +398,14 @@ class Config value = @constructor.executeSchemaValidators(value, schema) if schema = @getSchema(keyPath) value +# Base schema validators. These will coerce raw input into the specified type, +# and will throw an error when the value cannot be coerced. Throwing the error +# will indicate that the value should not be set. +# +# Validators are run from most specific to least. For a schema with type +# `integer`, all the validators for the `integer` type will be run first, in +# order of specification. Then the `*` validators will be run, in order of +# specification. Config.addSchemaValidators 'integer': coercion: (value, schema) ->