[EXTENSION] IP Validator

Detailed information is at http://www.yiiframew…on/ipvalidator/

Please use this thread to report any bugs or suggestions. Thanks.

Nice extension; maybe ipv6 validation? For a script you can look at this page

http://crisp.tweakbl…d-caveats).html

The regular expression is not right, as it considers IP addresses like 10a0a0a1 as valid.

We just need to use \. instead of . to match for the dot character so we have to change the regular expression to

/^(([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/

Uploaded v1.1 with the above bug fixed. Thanks.

I also added an option for checking v6 addresses too. Regex borrowed from: http://forums.dartware.com/viewtopic.php?t=452

P.S: Sorry for the delay but i’m playing with Yii only 1-2 times a year (if time permits)