You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is this issue currently blocking your project? (yes/no): no
is this issue affecting a production system? (yes/no): no
Context
node version: 16.9.1
module version: 17.4.2
environment (e.g. node, browser, native): node
used with (e.g. hapi application, another framework, standalone, ...): standalone
any other relevant information:
How can we help?
This is related to #1965. I am wondering if there is a way of validating whether a given URI has a certain hostname. This would be useful, for instance, to validate social media URIs (e.g., instagram, facebook, twitter). In the thread #1965 it is mentioned that the portion can be verified through some new option introduced in v16, but I couldn't figure out how to do it yet. For now I am relying on regex (see example below), though one could have a custom validation step (using node URL.hostname).
facebook: Joi.string().uri({scheme: 'https',domain: {// is there a way of checking the hostname here?}}).regex(/https:\/\/(www\.)?facebook\.com\/.*/).optional(),
The text was updated successfully, but these errors were encountered:
@hueniverse I'll love to help out with this, let me know if it's something you think I can help with.
Also, let me know if you've got any approach you'd like to me employ.
Support plan
Context
How can we help?
This is related to #1965. I am wondering if there is a way of validating whether a given URI has a certain hostname. This would be useful, for instance, to validate social media URIs (e.g., instagram, facebook, twitter). In the thread #1965 it is mentioned that the portion can be verified through some new option introduced in v16, but I couldn't figure out how to do it yet. For now I am relying on regex (see example below), though one could have a custom validation step (using node URL.hostname).
The text was updated successfully, but these errors were encountered: