'How to make jQuery.inputmask allow IP ranges?

I currently have an input that is used for inserting IP address. But I need to allow and IP ranges.

My current setup is

<script type='text/javascript' src="https://cdnjs.cloudflare.com/ajax/libs/jquery.inputmask/5.0.8-beta.17/jquery.inputmask.min.js"></script>

$("#ipAddress").inputmask({
     alias: "ip",
     greedy: false
});

How can I make this inputmask allow normal IP address & IP range (optional)? I've searched a lot in Google but nothing helps me. Any ideas?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source