lib/validator.js
function NUMBER_VALIDATOR(v) {
  v = (v || '').toString()
  var match = v.match(LENGTH_REGEXP)

  if (match && !match[1]) {
    return {value: parseFloat(v)}
  }

  return {
    value: null,
    reason: function reason(k, v, result) {
      return 'ERROR: property value `' + v + '` is not supported for `' + util.camelCaseToHyphened(k) + '` (only number is supported)'
    }
  }
}
function NUMBER_VALIDATOR(v) {
  v = (v || '').toString()
  var match = v.match(LENGTH_REGEXP)

  if (match && !match[1]) {
    return {value: parseFloat(v)}
  }

  return {
    value: null,
    reason: function reason(k, v, result) {
      return 'ERROR: property value `' + v + '` is not supported for `' + util.camelCaseToHyphened(k) + '` (only number is supported)'
    }
  }
}
function NUMBER_VALIDATOR ( v ) { v = ( v || '' ) . toString ( ) var match = v . match ( LENGTH_REGEXP ) if ( match && ! match [ 1 ] ) { return { value : parseFloat ( v ) } } return { value : null , reason : function reason ( k , v , result ) { return 'ERROR: property value `' + v + '` is not supported for `' + util . camelCaseToHyphened ( k ) + '` (only number is supported)' } } }
only integer or float value is valid

@param {string} v
@return {function} a function to return
- value: number|null
- reason(k, v, result)
only integer or float value is valid