Cătălin Tănăsescu
Cătălin Tănăsescu
``` js "use strict" const Joi = require('joi') const moves = { like: 'jagger', true: 'maybe' } const def = Joi.object({ true: Joi.string().valid('maybe') }) // OK console.log(String(def.validate(moves).error)) // ValidationError: "like"...
## What's the issue? fires error on page load when it shouldn't Uncaught (in promise) Resource: failed to build: amp-autocomplete#20: amp-autocomplete should contain exactly one or descendant amp-autocomplete ## How...
``` js 'use strict'; const Hapi = require('hapi'); const Boom = require('boom'); const Code = require('code'); const Lab = require('lab'); const lab = exports.lab = Lab.script(); const it = lab.it;...
When request response validation fails , when creating the Boom object, also pass along the original error object ? https://github.com/hapijs/hapi/blob/master/lib/validation.js#L201 right now it's ``` js return next(Boom.badImplementation(err.message)); ``` what do...
having dynamic default values creates more than 1 definition for the same object if re-used example ``` js { timestamp: Joi.date().timestamp().default(() => Date.now(), 'Current Timestamp').raw().example(1458333333333), } ``` proposed fix at...
if definition name is allready used, the alt name is unique each time we should make it unique based on the definition (hash of definition), this way it wont be...
please create a style guide, see for example http://hapijs.com/styleguide
``` js 'use strict'; // Load modules const Code = require('code'); const Lab = require('lab'); // Test shortcuts const lab = exports.lab = Lab.script(); const it = lab.test; const expect...