Skip to content

Instantly share code, notes, and snippets.

@khrlimam
Created April 25, 2019 10:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save khrlimam/841cabb11ae5f39b09bd5bfd9d631b5c to your computer and use it in GitHub Desktop.
Save khrlimam/841cabb11ae5f39b09bd5bfd9d631b5c to your computer and use it in GitHub Desktop.
<?php
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
static::$poolName => 'required|string',
static::$poolRangeBegin => 'required|ipv4',
static::$poolRangeEnd => 'required|ipv4',
static::$networkAddress => 'required|ipv4',
static::$networkSubnetMask => 'required|integer|min:8',
static::$networkDefaultGateway => 'required|ipv4',
static::$networkDns => 'required|array|min:1',
static::$networkDns.'.*' => 'distinct|nullable|ipv4',
static::$dhcpInterface => 'required|string',
static::$dhcpStatus => 'required'
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment