How to validate domain in angular or node javascript
___________________________________in Angular___________________________________first you need to install plugin using this command
npm install is-valid-domain
how to use or integrate plugin in component just need to follow this syntex and then use varible "isValidDomain" method that have serveral parameter
import * as isValidDomain from 'is-valid-domain';
and how to use validation
this.isvalidDomainName()
the defination of validator methord
isvalidDomainName() {
return isValidDomain(this.domainForm.get('DomainName').value, { subdomain: true })
}
_____________________________________in node__________________________________________
const isValidDomain =// true// true// true// true// true// true// false// false// false// false// false// false// false// true// false// false// true
For more information just go to its official site
https://www.npmjs.com/package/is-valid-domain
Very pleasant and professional work!!!! web design agencies inc nc
ReplyDelete