-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
non issueIssue is not a problem or requires changesIssue is not a problem or requires changes
Description
Context
- node version: 4.5.0
- joi version:10.1.0
- environment (node, browser): node
- used with (hapi, standalone, ...): standalone
- any other relevant information:
What are you trying to achieve or the steps to reproduce ?
validate base64 string
Describe your issue here, include schemas and inputs you are validating if needed.
const schema = { key: Joi.string().base64() }input = {key:'eyJ3b3JsZGlkRGF5IjoiV09STERJRDpEQVkifQ'}
Which result you had ?
{ failed: true,
error:
{ [ValidationError: child "lastKey" fails because ["lastKey" must be a valid base64 string]]
isJoi: true,
name: 'ValidationError',
details: [ [Object] ],
_object:
{
lastKey: 'eyJ3b3JsZGlkRGF5IjoiV09STERJRDpEQVkifQ' },
annotate: [Function] },
validationError: true }
What did you expect ?
no joi validation errors as input is valid base64
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
non issueIssue is not a problem or requires changesIssue is not a problem or requires changes