2021-05-21 08:49:41 +02:00

23 lines
401 B
PHP

<?php
namespace Rakit\Validation\Rules;
use Rakit\Validation\Rule;
class Defaults extends Rule
{
protected $message = "The :attribute default is :default";
protected $fillable_params = ['default'];
public function check($value)
{
$this->requireParameters($this->fillable_params);
$default = $this->parameter('default');
return $default;
}
}