PHP code example of onixsib / yii2-net-address-validators

1. Go to this page and download the library: Download onixsib/yii2-net-address-validators library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

onixsib / yii2-net-address-validators example snippets



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 

php composer.phar