Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@trellisorg/dns-validator

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trellisorg/dns-validator

Directive that can be attached to a form control (`input` or `textarea`) that will validate the domain entered in using Googles public DNS-over-HTTP (DoH) JSON API.

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

@trellisorg/dns-validator

Directive that can be attached to a form control (input or textarea) that will validate the domain entered in using Googles public DNS-over-HTTP (DoH) JSON API.

Useful if you want to validate that the domain entered by a user matches some valid DNS query (like en email has a valid MX record for the entered domain for example).

Install

yarn yarn add @trellisorg/dns-validator

npm npm i @trellisorg/dns-validator --save

Usage

<input
    placeholder="Enter a domain"
    dns
    type="email"
    [query]="{ type: 'mx' }"
    #dnsValidator="dns"
/>

<div>{{ dnsValidator.response$ | async | json }}</div>

The response$ observable will contain a Status property on it that correlates to if the DNS query is valid or not.

More info here:

https://developers.google.com/speed/public-dns/docs/doh

Keywords

FAQs

Package last updated on 13 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc