Skip to content

Bug Hunt: empty object() + pattern() + unknown(false) fails to error#366

Merged
hueniverse merged 1 commit intohapijs:masterfrom
Bartvds:bug/pattern-unknown
Jun 14, 2014
Merged

Bug Hunt: empty object() + pattern() + unknown(false) fails to error#366
hueniverse merged 1 commit intohapijs:masterfrom
Bartvds:bug/pattern-unknown

Conversation

@Bartvds
Copy link
Contributor

@Bartvds Bartvds commented Jun 13, 2014

I wanted to validate an object that is used as a 'map' with keys of a specific format. So I used this pattern but it doesn't error:

Joi.object().pattern(/\d/, Joi.number()).unknown(false)

Note I'm not sure about the expected error message but the test a never reaches that as we get an AssertionError: expected null to exists from the line above.

@hueniverse hueniverse changed the title Bug Hunt: empty object() + pattern() + unknown(true) fails to error Bug Hunt: empty object() + pattern() + unknown(false) fails to error Jun 14, 2014
@hueniverse hueniverse added this to the 4.6.1 milestone Jun 14, 2014
@hueniverse hueniverse self-assigned this Jun 14, 2014
hueniverse pushed a commit that referenced this pull request Jun 14, 2014
Bug Hunt: empty object() + pattern() + unknown(false) fails to error
@hueniverse hueniverse merged commit eac37d2 into hapijs:master Jun 14, 2014
@hueniverse
Copy link
Contributor

Confirmed. $50.

Please contact me at eran@hammer.io to arrange award delivery.

hueniverse pushed a commit that referenced this pull request Jun 14, 2014
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Bug or defect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants