Monthly Archive: January 2016

Javascript hostname and ip validate 0

Javascript hostname and ip validate

Validating hostname and IP occurs pretty often. This is what I use for a field that can contain both IPV4 or hostname : if (value.length === 0 || value.length > 511) { return "Address...