docs: function(value, params, property) {
              value = ''+value;
  
              if ('pattern' in params && !params.pattern.test(value)) {
                  throw new Error('Value "' + value +
                      '" of property "' + property + '" does not match pattern "' + params.pattern + '"!');
              }
              if ('variants' in params && -1 === params.variants.indexOf(value)) {
                  throw new Error('Value "' + value +
                      '" of property "' + property + '" must be one of "' + params.variants.join(', ') + '"!');
              }
              return value;
          }