commit
af5e4c6be6
|
@ -434,6 +434,18 @@ protected function validate_unique($attribute, $value, $parameters)
|
||||||
|
|
||||||
return $query->count() == 0;
|
return $query->count() == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validate that an attribute is a valid IP.
|
||||||
|
*
|
||||||
|
* @param string $attribute
|
||||||
|
* @param mixed $value
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
protected function validate_ip($attribute, $value)
|
||||||
|
{
|
||||||
|
return filter_var($value, FILTER_VALIDATE_IP) !== false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate that an attribute is a valid e-mail address.
|
* Validate that an attribute is a valid e-mail address.
|
||||||
|
|
Loading…
Reference in New Issue