Skip to content

Merging of two empty() should allow '' if it was explicitly defined #2005

@hueniverse

Description

@hueniverse
const a = Joi.string().valid('a').empty('');
const b = Joi.string().insensitive().empty(' ');
const ab = a.concat(b); // Should treats both '' and ' ' as empty

Metadata

Metadata

Assignees

Labels

bugBug or defect

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions