Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

method domain validator js

isDomain(arg) {
		let regexDomain = /^w+([.-]?w+)*(.w{2,3})+$/;
		if (arg.match(regexDomain)) {
			return true;
		} else {
			return false;
		}
	}
 
PREVIOUS NEXT
Tagged: #method #domain #validator #js
ADD COMMENT
Topic
Name
4+9 =