new validator: isMailtoURI, validate the mailto link URI format by uksarkar · Pull Request #2188 · validatorjs/validator.js

Added a new validation method for validating the mailto: link URI. Where it'll validate the URI format and also the email provided inside the appropriate query params.

Here is the format of a mailto link URI mailto:to(optional, comma-separated emails)?cc=(optional, comma-separated emails)&bb=(optional, comma-separated emails)&subject=(optional)&body=(optional)

Some links:
https://mailtrap.io/blog/mailto-links-explained/
https://en.wikipedia.org/wiki/Mailto

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (where applicable)
  • Tests written (where applicable)
  • References provided in PR (where applicable)