2017 © Pedro Peláez
 

yii2-extension yii2-net-address-validators

Validate IPv4, IPv6 and MAC for Yii 2 Framework.

image

onixsib/yii2-net-address-validators

Validate IPv4, IPv6 and MAC for Yii 2 Framework.

  • Monday, August 22, 2016
  • by onixsib
  • Repository
  • 1 Watchers
  • 1 Stars
  • 51 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 13 % Grown

The README.md

Yii2 Network Addresses Validators

Yii2 Extension that provide validators and features for validate network addresses, (*1)

  • IPv4Validator: Validate IPv4 address or IPv4 netmask
  • IPv6Validator: Validate IPv6 address
  • MACValidator: Validate MAC address
  • NetAddressValidator: Validate IPv4 address or IPv4 netmask or IPv6 address or MAC address

Yii2 Latest Stable Version Latest Unstable Version License Total Downloads GitHub issues Code Climate Scrutinizer Code Quality, (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer.phar require --prefer-dist onixsib/yii2-net-address-validators "*"

or add, (*5)

"onixsib/yii2-net-address-validators": "*"

to the require section of your composer.json file., (*6)

Usage

Add the rules as the following example, (*7)


use Yii; use yii\base\Model; use onixsib\validators\IPv4Validator; use onixsib\validators\IPv6Validator; use onixsib\validators\MACValidator; use onixsib\validators\NetAddressValidator; class NetworkInterface extends Model { public $name; public $IPv4; public $IPv4Netmask; public $IPv6; public $MAC; /** * @return array the validation rules. */ public function rules() { return [ // name is required ['name', 'required'], // IPv4 validator ['IPv4', IPv4Validator::className()], // IPv6 validator ['IPv6', IPv6Validator::className()], // MAC validator ['MAC', MACValidator::className()] ]; } }

The Versions

22/08 2016

dev-master

9999999-dev http://onixsib.ru

Validate IPv4, IPv6 and MAC for Yii 2 Framework.

  Sources   Download

BSD 3-Clause

The Requires

 

by OnixSib LLC

extension yii2 validator mac validators ipv6 ipv4

07/08 2016

1.0.0

1.0.0.0 http://onixsib.ru

Validate IPv4, IPv6 and MAC for Yii 2 Framework.

  Sources   Download

BSD 3-Clause

The Requires

 

by OnixSib LLC

extension yii2 validator mac validators ipv6 ipv4