Skip to content

Commit

Permalink
test: default tlds: { allow: true } on domain validation
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandollisboa committed Jan 24, 2024
1 parent f535a89 commit 9a62741
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/types/string.js
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,8 @@ describe('string', () => {
type: 'string.domain',
context: { value: '"example.com', label: 'value' }
}],
['[email protected]', false, '"value" must contain a valid domain name']
['[email protected]', false, '"value" must contain a valid domain name'],
['joi.dev.whatevertldiwant', false, '"value" must contain a valid domain name']
]);
});

Expand Down Expand Up @@ -1496,7 +1497,8 @@ describe('string', () => {
type: 'string.email',
context: { value: '123456789012345678901234567890123456789012345678901234567890@12345678901234567890123456789012345678901234567890123456789.12345678901234567890123456789012345678901234567890123456789.12345678901234567890123456789012345678901234567890123456789.12345.toolong.com', invalids: ['123456789012345678901234567890123456789012345678901234567890@12345678901234567890123456789012345678901234567890123456789.12345678901234567890123456789012345678901234567890123456789.12345678901234567890123456789012345678901234567890123456789.12345.toolong.com'], label: 'value' }
}],
['foo@bar%2ecom', false, '"value" must be a valid email']
['foo@bar%2ecom', false, '"value" must be a valid email'],
['[email protected]', false, '"value" must be a valid email']
]);
});

Expand Down

0 comments on commit 9a62741

Please sign in to comment.