Digital PCI Fast Hosting & Custom Design
Hosting Development
Custom Web Development WordPress Development SEO Services Developer Blog
Dedicated Servers
Virtual Private Servers Semi-Dedicated Server Dedicated Servers
Member Login Tools
Version Control System Code Unminifier DNS Lookup Digital PCI Radio
About
About Digital PCI Data Centers Contact Us
Digital PCI
Hosting Development
Custom Web Development WordPress Development SEO Services Developer Blog
Dedicated Servers
Virtual Private Servers Semi-Dedicated Server Dedicated Servers
Tools
Version Control System Code Unminifier DNS Lookup Digital PCI Radio
About
About Digital PCI Data Centers Contact Us

IPv4 Address Validator

June 19th, 2019   /   By Andrew Currie

Learn more about IPv4 Address Validator

A common programming exercise is to write some code that will validate an IP address. IPv4 addresses are displayed canonically using dot-decimal notation and they consist of four decimal numbers or octets that range from zero to 255 separated by periods.

Let’s build a simple form that will validate an IPv4 address using JavaScript and Regular Expression. To do this we are going to need three files: index.html, validator.js and style.css the web page, the JavaScript and the stylesheet, respectively.

To make the form look a little better, let’s use the 50 lines of CSS below in the stylesheet, style.css:

Once you put it all together, you will end up with a form that looks like the one below:

Click on the image above to see the IPv4 Address Validator in action.

Digital PCI What is Digital PCI? Website Development Digital PCI Radio
Tools Version Control System Code Unminifier DNS Lookup
QuickLinks Member Login Contact Us

© 2025