code: function assignValid (key, descriptor, source, target, options) {
    // read the source value
    var value = source[descriptor.from] || source[key]
  
    // set the default value
    if (!value && typeof descriptor.default !== 'undefined') {
      value = (typeof descriptor.default === 'function')
        ? descriptor.default()
        : descriptor.default
    }
  
    // ensure a required value is present
    assertPresence(key, value, descriptor)
  
    // verify and assign
    if (value) {
      assertFormat(key, value, descriptor)
      assertEnumerated(key, value, descriptor)
      target[key] = value
    }
  }
docs: Assign Valid