How to use the z-schema/src/FormatValidators.hostname function in z-schema

To help you get started, we’ve selected a few z-schema examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github LiskHQ / lisk-sdk / framework / src / modules / http_api / helpers / z_schema.js View on Github external
ipOrFQDN(str) {
		if (typeof str !== 'string') {
			return false;
		}

		return ip.isV4Format(str) || FormatValidators.hostname(str);
	},
	/**
github LiskHQ / lisk-sdk-examples / framework / src / modules / chain / helpers / z_schema.js View on Github external
ipOrFQDN(str) {
		if (typeof str !== 'string') {
			return false;
		}

		return ip.isV4Format(str) || FormatValidators.hostname(str);
	},
	/**